<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <link rel="canonical" href="https://blog.csdn.net/shaoyiwenet/article/details/53256103"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <meta name="renderer" content="webkit"/>
    <meta name="force-rendering" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="report" content='{"pid":"blog"}'>
    <meta name="referrer" content="always">
    <meta http-equiv="Cache-Control" content="no-siteapp" /><link rel="alternate" media="handheld" href="#" />
    <meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
        <meta name="csdn-baidu-search"  content='{"autorun":true,"install":true,"keyword":"MySQL的UDF - shaoyiwenet的专栏"}'>
    
    <link href="https://csdnimg.cn/public/favicon.ico" rel="SHORTCUT ICON">
    <title>MySQL的UDF - shaoyiwenet的专栏 - CSDN博客</title>

        
                    <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/detail-3c56c08d12.min.css">
            
        
            <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/themes/skin3-template/skin3-template-9b39979775.min.css">
        <script type="text/javascript">
        var username = "shaoyiwenet";
        var blog_address = "https://blog.csdn.net/shaoyiwenet";
        var static_host = "https://csdnimg.cn/release/phoenix/";
        var currentUserName = "";
        var isShowAds = true;
        var isOwner = false;
        var loginUrl = "http://passport.csdn.net/account/login?from=https://blog.csdn.net/shaoyiwenet/article/details/53256103"
        var blogUrl = "https://blog.csdn.net/";

        var curSkin = "skin3-template";
        // 收藏所需数据
        var articleTitle = "MySQL的UDF";
        var articleDesc = "最近用到MySQL的UDF,查了一下相关文献,对用户用户实现function和Aggregatefunction的方法做个介绍.";
        // 第四范式所需数据
        var articleTitles = "MySQL的UDF - shaoyiwenet的专栏";
        
        var nickName = "YiwenShao";
        var isCorporate = false;
        var subDomainBlogUrl = "https://blog.csdn.net/"
        var digg_base_url = "https://blog.csdn.net/shaoyiwenet/phoenix/comment";
        var articleDetailUrl = "https://blog.csdn.net/shaoyiwenet/article/details/53256103";
    </script>
    <script src="https://csdnimg.cn/public/common/libs/jquery/jquery-1.9.1.min.js" type="text/javascript"></script>
    <script src="//g.csdnimg.cn/??fixed-sidebar/1.1.3/fixed-sidebar.js,report/1.0.4/report.js" type="text/javascript"></script>
    <link rel="stylesheet" href="https://csdnimg.cn/public/sandalstrap/1.4/css/sandalstrap.min.css">
    <style>
        .MathJax, .MathJax_Message, .MathJax_Preview{
            display: none
        }
    </style>
</head>
<body class="nodata " > 
    <link rel="stylesheet" href="https://csdnimg.cn/public/common/toolbar/content_toolbar_css/content_toolbar.css">
    <script id="toolbar-tpl-scriptId" src="https://csdnimg.cn/public/common/toolbar/js/content_toolbar.js" type="text/javascript" domain="https://blog.csdn.net/"></script>
<div id="kp_box_476" data-pid="476" data-track-view='{"mod":"kp_popu_476-844","con":",,"}' data-track-click='{"mod":"kp_popu_476-844","con":",,"}' data-report-view='{"mod":"kp_popu_476-844","keyword":""}' data-report-click='{"mod":"kp_popu_476-844","keyword":""}'><script src="//csdnimg.cn/public/common/indexSuperise/1.1.1/indexSuperise.js?20190111165312"></script><script>window.csdn.indexSuperise({smallMoveImg:'https://img-bss.csdn.net/1561687436774.png',bigMoveImg:'https://img-bss.csdn.net/1561687434206.png',link:'https://kunyu.csdn.net?p=476&a=844&c=280&k=&d=1&t=3&dest=https%3A%2F%2Fh5.youzan.com%2Fv2%2Fgoods%2F3no2fsmxbmehb',trackSuperId:476,smallMove:'notMove',trackSId:844});</script></div><link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/blog_code-c3a0c33d5c.css">
<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/vendor/pagination/paging-e040f0c7c8.css">

<script type="text/javascript">
	var NEWS_FEED = function(){}
</script>

<link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/chart-3456820cac.css" />
<div class="container clearfix" id="mainBox">
			<div class="recommend-right">
  <ul class="recommend-fixed-box">
    
  </ul>
</div>	    <main>
        <div class="blog-content-box">
    <div class="article-header-box">
        <div class="article-header">
            <div class="article-title-box">
                <span class="article-type type-1 float-left">原</span>                <h1 class="title-article">MySQL的UDF</h1>
            </div>
            <div class="article-info-box">
                <div class="article-bar-top">
                                                                                                                                            <span class="time">2016年11月21日 09:14:24</span>
                    <a class="follow-nickName" href="https://me.csdn.net/shaoyiwenet" target="_blank">YiwenShao</a>
                    <span class="read-count">阅读数 7865</span>
                                    </div>
                <div class="operating">
                                    </div>
            </div>
        </div>
    </div>
    <article class="baidu_pl">
                <div id="article_content" class="article_content clearfix">
                                    <link rel="stylesheet" href="https://csdnimg.cn/release/phoenix/template/css/ck_htmledit_views-3019150162.css" />
                                        <div id="content_views" class="markdown_views prism-atom-one-dark">
                    <!-- flowchart 箭头图标 勿删 -->
                    <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
                        <path stroke-linecap="round" d="M5,0 0,2.5 5,5z" id="raphael-marker-block" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"></path>
                    </svg>
                                            <p>最近用到MySQL的UDF, 查了一下相关文献, 对用户用户实现function和Aggregate function的方法做个介绍.</p>

<!--more-->



<h3 id="快速编写一个mysql-udf">快速编写一个MySQL UDF</h3>

<p>为了能够快速了解UDF(user-defined function)是什么, 我们首先构建一个最简单的UDF, 然后再介绍更细节的内容. 本文在Ubuntu16.04下测试, 开始之前需要先安装MySQL以及相关的库, 在Ubuntu下是:</p>



<pre class="prettyprint"><code class=" hljs lasso">sudo apt<span class="hljs-attribute">-get</span> install libmysqlclient<span class="hljs-attribute">-dev</span></code></pre>



<h4 id="step1-编写c代码并生成动态链接库">Step1: 编写c++代码并生成动态链接库</h4>

<p>示例c++代码如下:</p>



<pre class="prettyprint"><code class="language-cpp hljs "><span class="hljs-keyword">extern</span> <span class="hljs-string">"c"</span>{
<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> myadd(UDF_INIT *initid, UDF_ARGS *args,
                <span class="hljs-keyword">char</span> *is_null, <span class="hljs-keyword">char</span> *error);
my_bool myadd_init(UDF_INIT *initid, UDF_ARGS *args,
                  <span class="hljs-keyword">char</span> *message);
}

<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> myadd(UDF_INIT *initid, UDF_ARGS *args,
                <span class="hljs-keyword">char</span> *is_null, <span class="hljs-keyword">char</span> *error) {
    <span class="hljs-keyword">int</span> a = *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)args-&gt;args[<span class="hljs-number">0</span>]);
    <span class="hljs-keyword">int</span> b = *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)args-&gt;args[<span class="hljs-number">1</span>]);
    <span class="hljs-keyword">return</span> a + b;
}

my_bool myadd_init(UDF_INIT *initid, UDF_ARGS *args,
                  <span class="hljs-keyword">char</span> *message){
    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}</code></pre>

<p>完成以后, 将文件保存为udf.cpp 然后使用如下的命令编译动态链接库:</p>



<pre class="prettyprint"><code class=" hljs lasso">g<span class="hljs-subst">++</span> <span class="hljs-attribute">-shared</span> <span class="hljs-attribute">-fPIC</span> <span class="hljs-attribute">-I</span> /usr/include/mysql <span class="hljs-attribute">-o</span> udf<span class="hljs-built_in">.</span>so udf<span class="hljs-built_in">.</span>cpp</code></pre>

<p>获得udf.so文件.</p>



<h4 id="step2-在mysql中添加函数">Step2: 在MySQL中添加函数</h4>

<p>完成上述的编写以后, 讲udf.so文件拷贝到MySQL的plugin目录下, 在Ubuntu16.04中默认是:</p>



<pre class="prettyprint"><code class=" hljs vbnet">/usr/<span class="hljs-keyword">lib</span>/mysql/plugin/</code></pre>

<p>然后使用如下的命令在MySQL中安装动态链接库. </p>



<pre class="prettyprint"><code class=" hljs sql"><span class="hljs-operator"><span class="hljs-keyword">CREATE</span> FUNCTION myadd RETURNS <span class="hljs-keyword">INTEGER</span> SONAME <span class="hljs-string">'udf.so'</span></span></code></pre>



<h4 id="step3-调用函数以及相关查询">Step3: 调用函数以及相关查询</h4>

<ul>
<li>调用函数</li>
</ul>



<pre class="prettyprint"><code class=" hljs sql"><span class="hljs-operator"><span class="hljs-keyword">select</span> myadd(<span class="hljs-number">1</span>,<span class="hljs-number">2</span>);</span></code></pre>

<p>可以获得计算结果3</p>

<ul>
<li>查询安装列表</li>
</ul>



<pre class="prettyprint"><code class=" hljs sql"><span class="hljs-operator"><span class="hljs-keyword">select</span> * <span class="hljs-keyword">from</span> mysql.func;</span></code></pre>

<p>可以查看数据库当前被安装的.so的库列表.</p>

<ul>
<li>用drop function来删除函数:</li>
</ul>



<pre class="prettyprint"><code class=" hljs php">DROP <span class="hljs-function"><span class="hljs-keyword">FUNCTION</span> <span class="hljs-title">myadd</span>;</span></code></pre>



<h3 id="udf编写过程解释">UDF编写过程解释</h3>

<p>可以看到, 我们在上面添加了自己的函数myadd, 这个函数被安装以后可以被MySQL执行. 我们同时定义了myadd_init, 这是系统规定的必须使用的初始化函数. 在编写MySQL的UDF的时候, 一方面我们要定义自己需要的函数, 另一方面, 我们要同时编写配套的一系列其他函数, 这些函数的命名有固定规则. 比如用户自定义的函数名为xxx, 则配套的函数为xxx_init, xxx_deinit等, 其参数列表也是固定的,下面进行介绍. </p>



<h4 id="编写用户主函数">编写用户主函数</h4>

<p>首先是用户函数的定义, 我们假设需要定义的函数名字为为xxx, 则我们的函数需要有参数列表和返回值, 这不能由用户随意指定, 是有固定规则的. </p>

<p>其中返回类型支持5种:</p>



<pre class="prettyprint"><code class=" hljs rust"><span class="hljs-keyword">enum</span> <span class="hljs-title">Item_result</span> {STRING_RESULT=<span class="hljs-number">0</span>, REAL_RESULT, INT_RESULT, ROW_RESULT,  DECIMAL_RESULT}; </code></pre>

<p>对于这5种返回值, 定义的函数头分别如下:</p>

<ul>
<li>返回值是STRING 类型或DECIMAL类型</li>
</ul>



<pre class="prettyprint"><code class=" hljs perl">char <span class="hljs-variable">*xxx</span>(UDF_INIT <span class="hljs-variable">*initid</span>, UDF_ARGS <span class="hljs-variable">*args</span>,
          char <span class="hljs-variable">*result</span>, unsigned long <span class="hljs-variable">*length</span>,
          char <span class="hljs-variable">*is_null</span>, char <span class="hljs-variable">*error</span>);</code></pre>

<p>对于这种定义, 返回值可以指向result, 把需要的内容拷贝进去, 并设置长度, 如下:</p>



<pre class="prettyprint"><code class=" hljs applescript">memcpy(<span class="hljs-constant">result</span>, <span class="hljs-string">"result string"</span>, <span class="hljs-number">13</span>);
*<span class="hljs-property">length</span> = <span class="hljs-number">13</span>;</code></pre>

<ul>
<li>INTEGER类型</li>
</ul>



<pre class="prettyprint"><code class=" hljs vbnet"><span class="hljs-built_in">long</span> <span class="hljs-built_in">long</span> xxx(UDF_INIT *initid, UDF_ARGS *args,
              <span class="hljs-built_in">char</span> *is_null, <span class="hljs-built_in">char</span> *<span class="hljs-keyword">error</span>);</code></pre>

<ul>
<li>REAL类型</li>
</ul>



<pre class="prettyprint"><code class=" hljs vbnet"><span class="hljs-built_in">double</span> xxx(UDF_INIT *initid, UDF_ARGS *args,
              <span class="hljs-built_in">char</span> *is_null, <span class="hljs-built_in">char</span> *<span class="hljs-keyword">error</span>);</code></pre>

<ul>
<li>ROW类型</li>
</ul>

<p>未实现</p>



<h4 id="编写系统内置函数">编写系统内置函数</h4>

<p>在完成了用户定义的主函数以后, 还需要编写配套的系统内置函数. 其相关说明如下:</p>



<h5 id="xxxinit">xxx_init</h5>

<p>这个函数会在自定义的xxx函数调用前被调用, 进行基本的初始化工作, 其完整定义如下:</p>

<p><code> <br>
my_bool xxx_init(UDF_INIT *initid, UDF_ARGS *args, char *message); <br>
</code></p>

<ul>
<li>返回值: 1代表出错, 可以在message中给出错误信息并且返回给客户端, 0表示正确执行.信息长度不能大于MYSQL_ERRMSG_SIZE</li>
<li>函数功能: 该函数的主要功能一般是分配空间, 函数参数检查的等. 如果不需要做任何操作, 直接返回0即可.</li>
</ul>



<h5 id="xxxdeinit">xxx_deinit</h5>

<p>该函数用于释放申请的空间, 其完整定义如下:</p>



<pre class="prettyprint"><code class=" hljs cs"><span class="hljs-keyword">void</span> xxx_deinit(UDF_INIT *initid);
</code></pre>

<ul>
<li>函数功能: 该函数的功能主要是释放资源, 如果在xxx_init中申请了内存, 可以在此处释放, 该函数在用户函数xxx执行以后执行</li>
</ul>

<p>对于普通的UDF, 上面两个内置函数足够了, 但是对于Aggregate函数, 像sum, count函数, 必须额外给出如下的函数:</p>



<h5 id="xxxclear">xxx_clear</h5>

<p>其完整定义如下:</p>



<pre class="prettyprint"><code class=" hljs cs"><span class="hljs-keyword">void</span> xxx_clear(UDF_INIT *initid, <span class="hljs-keyword">char</span> *is_null, <span class="hljs-keyword">char</span> *error);
</code></pre>



<h5 id="xxxadd">xxx_add</h5>



<pre class="prettyprint"><code class=" hljs perl">void xxx_add(UDF_INIT <span class="hljs-variable">*initid</span>, UDF_ARGS <span class="hljs-variable">*args</span>,
             char <span class="hljs-variable">*is_null</span>, char <span class="hljs-variable">*error</span>);</code></pre>



<h4 id="两种udf的执行流程介绍">两种UDF的执行流程介绍</h4>

<p>这两种UDF非别有如下的执行流程:</p>



<h5 id="普通函数执行流程">普通函数执行流程</h5>

<ul>
<li>调用xxx_init来初始化, 并申请内存空间用于存储结果</li>
<li>调用xxx</li>
<li>调用xxx_deinit释放空间</li>
</ul>

<p>对于普通函数的执行流程, 可以参照一开始给出的myadd函数.</p>



<h5 id="aggregate函数执行流程">Aggregate函数执行流程</h5>

<ul>
<li>调用xxx_init来初始化, 并申请内存空间用于存储结果</li>
<li>对表使用group by 排序, 形成多个或一个group</li>
<li>xxx_clear调用, 对每个新的group, 调用之</li>
<li>对每个group的每一行,调用xxx_add</li>
<li>调用xxx</li>
<li>重复3-5, 直到处理完所有的group</li>
<li>调用xxx_deinit释放空间</li>
</ul>

<p>对于Aggregate函数的执行流程, 可以参照后面给出的mysum函数.</p>



<h4 id="函数参数列表介绍">函数参数列表介绍</h4>

<p>对于上面介绍的函数, 其参数列表和返回值是我们所关注的, 对于某些函数特有的参数, 在上面介绍函数的同时已经做了介绍, 现在介绍其公有的参数部分:</p>



<h5 id="udfinit">UDF_INIT</h5>

<p>该结构主要用于用户函数与系统内置函数的通信, 其结构如下:</p>

<table>
<thead>
<tr>
  <th>成员</th>
  <th>作用</th>
</tr>
</thead>
<tbody><tr>
  <td>my_bool maybe_null</td>
  <td>其值为1表示函数可以返回NULL, 默认值是1</td>
</tr>
<tr>
  <td>unsigned int decimals</td>
  <td>参数如果是小数, 表示小数点后面的位数</td>
</tr>
<tr>
  <td>unsigned int max_length</td>
  <td>返回结果的最大长度</td>
</tr>
<tr>
  <td>char *ptr</td>
  <td>用户可以申请自己的内存空间, 然后用这个指针指向自己的空间供自己的函数使用</td>
</tr>
<tr>
  <td>my_bool const_item</td>
  <td>如果用户函数对于相同输入总有相同输出, 则其值为1, 这是默认值. 否则则设置为0</td>
</tr>
</tbody></table>


<p>在本文例子中, 我们只用到ptr, 其余均使用默认值. 所谓的通信, 是指我们在xxx_init中就有这个参数了, 后后续的xxx与xxx_deinit中, 我们依然可以获取这个类型的指针, 这样, 我们就可以在xxx_init函数中申请一块空间, 并令ptr指向这块空间, 在xxx函数中使用这块空间, 然后在xxx_deinit中释放空间, 这是MySQL的UDF的基本用法. </p>



<h5 id="udfargs">UDF_ARGS</h5>

<p>该结构主要用于传参数, 参数由MySQL提供, 对于表而言, 就是一行一行的表数据, 其介绍如下:</p>

<table>
<thead>
<tr>
  <th>成员</th>
  <th>作用</th>
</tr>
</thead>
<tbody><tr>
  <td>unsigned int arg_count</td>
  <td>函数参数的个数, 可以在xxx_init函数中通过这个成员对用户输入的参数个数进行检查, 如果参数个数错误, 则不执行或返回错误</td>
</tr>
<tr>
  <td>enum Item_result *arg_type</td>
  <td>参数的类型, 可以在这不做参数类型的检查, 也可以自己强制指定类型,类型有5种, 在前一小节已有说明</td>
</tr>
<tr>
  <td>char **args</td>
  <td>如果参数是STRING_RESULT类型,可以通过args-&gt;args[i]来获取内容, 通过args-&gt;lengths[i]来获取长度; 如果是 INT_RESULT可以通过int_val = <em>((long long</em>) args-&gt;args[i]);来获取内容  REAL_RESULT或者STRING_RESULT类型可以通过real_val = <em>((double</em>) args-&gt;args[i]);来获取内容</td>
</tr>
<tr>
  <td>unsigned long *lengths</td>
  <td>对于初始化函数, 保存了参数的最大长度. 对于用户定义的主函数, 保持了各个参数的长度, 这个对于string类型有用, 因为这里的string不一定是’\0’结尾的</td>
</tr>
<tr>
  <td>char *maybe_null</td>
  <td>其值为0表示一个参数不能是null, 1表示可以</td>
</tr>
<tr>
  <td>char **attributes</td>
  <td>可以获得参数的名字.比如SELECT my_udf(expr1, expr2 AS alias1, expr3 alias2);则args-&gt;attributes[0] = “expr1” args-&gt;attribute_lengths[0] = 5 后面同理</td>
</tr>
<tr>
  <td>unsigned long *attribute_lengths</td>
  <td>每个参数名字的长度</td>
</tr>
</tbody></table>


<p>可以看到, 这个参数结构提供了很多功能, 本文只关注通过args成员来获得具体的参数内容.</p>



<h4 id="一个aggregate-函数的例子">一个Aggregate 函数的例子</h4>

<p>有了上面的基础, 我们就可以自己实现一个sum函数mysum, 其作用和内置的sum有一样的功能, 下面给出代码和解释:</p>



<pre class="prettyprint"><code class=" hljs cpp"><span class="hljs-preprocessor">#include &lt;mysql/mysql.h&gt;</span>

<span class="hljs-keyword">extern</span> <span class="hljs-string">"C"</span> {
my_bool   mysum_init(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                           <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> message);
<span class="hljs-keyword">void</span> mysum_deinit(UDF_INIT *<span class="hljs-keyword">const</span> initid);
<span class="hljs-keyword">void</span> mysum_clear(UDF_INIT *<span class="hljs-keyword">const</span> initid, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null,
                            <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error);
<span class="hljs-keyword">void</span> mysum_add(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                          <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error);
<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> mysum(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                      <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> result, <span class="hljs-keyword">unsigned</span> <span class="hljs-keyword">long</span> *<span class="hljs-keyword">const</span> length,
                      <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error);
}



<span class="hljs-comment">//执行前先进行初始化,分配空间</span>
my_bool mysum_init(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                           <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> message){
    <span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> * i = <span class="hljs-keyword">new</span> <span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span>;
    initid-&gt;ptr = (<span class="hljs-keyword">char</span>*)i;
    <span class="hljs-keyword">return</span> <span class="hljs-number">0</span>;
}

<span class="hljs-comment">//在执行该函数前,先执行group by, 然后遇到每个新的group, 先调用该函数.如果没有group by, 则所有的都是一个group.</span>
<span class="hljs-keyword">void</span> mysum_clear(UDF_INIT *<span class="hljs-keyword">const</span> initid, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null,
                            <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error) {
    *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)(initid-&gt;ptr)) = <span class="hljs-number">0</span>;
}

<span class="hljs-comment">//每一行数据都经过add函数处理</span>
<span class="hljs-keyword">void</span>   mysum_add(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                          <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error) {
    *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)(initid-&gt;ptr)) =  *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)(initid-&gt;ptr)) +
                                    *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)args-&gt;args[<span class="hljs-number">0</span>]);
}

<span class="hljs-comment">//所有数据处理完成, 调用用户定义的mysum函数返回结果;遇到下一个group, 重新从clear开始执行.</span>
<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> mysum(UDF_INIT *<span class="hljs-keyword">const</span> initid, UDF_ARGS *<span class="hljs-keyword">const</span> args,
                      <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> result, <span class="hljs-keyword">unsigned</span> <span class="hljs-keyword">long</span> *<span class="hljs-keyword">const</span> length,
                      <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> is_null, <span class="hljs-keyword">char</span> *<span class="hljs-keyword">const</span> error) {
    <span class="hljs-keyword">return</span> *((<span class="hljs-keyword">long</span> <span class="hljs-keyword">long</span> *)(initid-&gt;ptr));
}

<span class="hljs-comment">//执行结束, 释放空间</span>
<span class="hljs-keyword">void</span> mysum_deinit(UDF_INIT *<span class="hljs-keyword">const</span> initid){

    <span class="hljs-keyword">delete</span> initid-&gt;ptr;
}


</code></pre>

<p>使用上述的方法编译并复制到对应的plugin目录以后, 可以用如下的命令添加函数, 注意这里和添加普通的函数方法不一样.</p>



<pre class="prettyprint"><code class=" hljs sql"><span class="hljs-operator"><span class="hljs-keyword">CREATE</span> AGGREGATE FUNCTION mysum RETURNS <span class="hljs-keyword">INTEGER</span> SONAME <span class="hljs-string">'udf.so'</span>;</span>
</code></pre>

<p>函数执行结果如下:</p>



<pre class="prettyprint"><code class=" hljs asciidoc">Database changed
<span class="hljs-header">mysql&gt; select * from student;
+------+-----------+</span>
<span class="hljs-header">| id   | name      |
+------+-----------+</span>
|    1 | zhangfei  |
|    2 | zhangfei  |
|    3 | zhangfei  |
|    4 | zhangliao |
|    5 | zhangliao |
|    6 | zhangliao |
<span class="hljs-header">|    7 | shaoyiwen |
+------+-----------+</span>
7 rows in set (0.00 sec)

<span class="hljs-header">mysql&gt; select mysum(id) from student;
+-----------+</span>
<span class="hljs-header">| mysum(id) |
+-----------+</span>
<span class="hljs-header">|        28 |
+-----------+</span>
1 row in set (0.00 sec)
</code></pre>



<h3 id="总结">总结</h3>

<p>可以看到, MySQL的UDF可以用于处理MySQL表中的数据, 其对外提供了普通函数与Aggregate函数接口, 普通函数处理一行的数据, Aggregate函数处理一个group的数据. 其函数头是固定的, 对外提供了5种数据类型.需要注意的是, 我们编写的MySQL UDF必须保证是线程安全的.</p>



<h3 id="相关资料">相关资料</h3>

<p><a href="http:/dev.mysql.com/doc/refman/5.7/en/adding-udf.html" rel="nofollow" data-token="c888b93c0b58461137c9a1fbceeabe6b">[1] http:/dev.mysql.com/doc/refman/5.7/en/adding-udf.html</a> <br>
<a href="http:/blog.csdn.net/luoqiya/article/details/12888553" rel="nofollow" data-token="1542d73f9d3787df1be8ddc9c4217e24">[2] http:/blog.csdn.net/luoqiya/article/details/12888553</a> <br>
<a href="http:/www.codeproject.com/Articles/15643/MySQL-User-Defined-Functions" rel="nofollow" data-token="277032b544fdbd1284330aba87cfea08">[3] http:/www.codeproject.com/Articles/15643/MySQL-User-Defined-Functions</a></p>

<hr>

<p>原始链接:yiwenshao.github.io/2016/11/20/MySQL的UDF/</p>

<p>文章作者:Yiwen Shao</p>

<p>许可协议: Attribution-NonCommercial 4.0</p>

<p>转载请保留以上信息, 谢谢!</p>                                    </div>
                <link href="https://csdnimg.cn/release/phoenix/mdeditor/markdown_views-e44c3c0e64.css" rel="stylesheet">
                    </div>
    </article>
</div>

            <div class="hide-article-box hide-article-pos text-center">
            <a class="btn-readmore" data-report-view='{"mod":"popu_376","dest":"https://blog.csdn.net/shaoyiwenet/article/details/53256103","strategy":"readmore"}' data-report-click='{"mod":"popu_376","dest":"https://blog.csdn.net/shaoyiwenet/article/details/53256103","strategy":"readmore"}'>
                展开阅读全文
                <svg class="icon chevrondown" aria-hidden="true">
                    <use xlink:href="#csdnc-chevrondown"></use>
                </svg>
            </a>
        </div>
    
<script>
    $(".MathJax").remove();
    if ($('div.markdown_views pre.prettyprint code.hljs').length > 0) {
        $('div.markdown_views')[0].className = 'markdown_views';
    }
    var persentSet = 1;
</script>

<script src="https://csdnimg.cn/release/phoenix/vendor/linkCatcher/linkCatcher-3a08af3a5f.js"></script>        <div id="dmp_ad_58"><div id="kp_box_58" data-pid="58" data-track-view='{"mod":"kp_popu_58-402","con":",,"}' data-track-click='{"mod":"kp_popu_58-402","con":",,"}' data-report-view='{"mod":"kp_popu_58-402","keyword":""}' data-report-click='{"mod":"kp_popu_58-402","keyword":""}'><div style="width:100%;background:#fff;border:3px solid #fff;padding:16px 0px 0px 0px;">
<script type="text/javascript" src="//static.mediav.com/js/mvf_news_feed.js"></script>
<div id="three_ad1" class="mediav_ad" ></div>
<script>
                                               NEWS_FEED({
                w: 900,
                h : 100,
                showid : 'ztvJV8',
                placeholderId: "three_ad1",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 0,
                    imageWidth: 90,
                    imageHeight: 68,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft YaHei',
                    paddingTop : 10,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 20,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script>
</div></div></div>        <a id="commentBox"></a>
<div class="comment-box">
	
	<div class="comment-edit-box d-flex">
		<a id="commentsedit"></a>
		<div class="user-img">
			<a href="javascript:void(0);" target="_blank">
				<img class="show_loginbox" src="//g.csdnimg.cn/static/user-img/anonymous-User-img.png">
			</a>
		</div>
		<form id="commentform">
			<input type="hidden" id="comment_replyId">
			<textarea class="comment-content" name="comment_content" id="comment_content" placeholder="想对作者说点什么"></textarea>
			<div class="opt-box"> <!-- d-flex -->
				<div id="ubbtools" class="add_code">
					<a href="#insertcode" code="code" target="_self"><i class="icon iconfont icon-daima"></i></a>
				</div>
				<input type="hidden" id="comment_replyId" name="comment_replyId">
				<input type="hidden" id="article_id" name="article_id" value="53256103">
				<input type="hidden" id="comment_userId" name="comment_userId" value="">
				<input type="hidden" id="commentId" name="commentId" value="">
				<div style="display: none;" class="csdn-tracking-statistics tracking-click" data-report-click='{"mod":"popu_384","dest":""}'><a href="#" target="_blank" class="comment_area_btn">发表评论</a></div>
				<div class="dropdown" id="myDrap">
					<a class="dropdown-face d-flex align-items-center" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
					<div class="txt-selected text-truncate">添加代码片</div>
					<svg class="icon d-block" aria-hidden="true">
						<use xlink:href="#csdnc-triangledown"></use>
					</svg>
					</a>
					<ul class="dropdown-menu" id="commentCode" aria-labelledby="drop4">
						<li><a data-code="html">HTML/XML</a></li>
						<li><a data-code="objc">objective-c</a></li>
						<li><a data-code="ruby">Ruby</a></li>
						<li><a data-code="php">PHP</a></li>
						<li><a data-code="csharp">C</a></li>
						<li><a data-code="cpp">C++</a></li>
						<li><a data-code="javascript">JavaScript</a></li>
						<li><a data-code="python">Python</a></li>
						<li><a data-code="java">Java</a></li>
						<li><a data-code="css">CSS</a></li>
						<li><a data-code="sql">SQL</a></li>
						<li><a data-code="plain">其它</a></li>
					</ul>
				</div>  
				<div class="right-box">
					<span id="tip_comment" class="tip">还能输入<em>1000</em>个字符</span>
					<input type="button" class="btn btn-sm btn-cancel d-none" value="取消回复">
					<input type="submit" class="btn btn-sm btn-red btn-comment" value="发表评论">
				</div>
			</div>
		</form>
	</div>

		<div class="comment-list-container">
		<a id="comments"></a>
		<div class="comment-list-box">
		</div>
		<div id="commentPage" class="pagination-box d-none"></div>
		<div class="opt-box text-center">
			<div class="btn btn-sm btn-link-blue" id="btnMoreComment"></div>
		</div>
	</div>
</div>
        <div class="recommend-box">
                            <div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/shatamadedongxi/article/details/7991603","strategy":"BlogCommendFromMachineLearnPai2","index":"0"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/shatamadedongxi/article/details/7991603","strategy":"BlogCommendFromMachineLearnPai2","index":"0"}'>
	<div class="content">
		<a href="https://blog.csdn.net/shatamadedongxi/article/details/7991603" target="_blank" title="js获取浏览器信息和客户端硬件信息（一）">
		<h4 class="text-truncate oneline">
				js获取浏览器信息和客户端硬件信息（一）		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">09-18</span>
				<span class="read-num hover-hide">
					阅读数 
					1万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/shatamadedongxi/article/details/7991603" target="_blank" title="js获取浏览器信息和客户端硬件信息（一）">
				<span class="desc oneline">最近要用js实现一个客户端采集器的功能，在网上查了一些，感觉网上的有些乱，而且也不是很全，在此做了一个整理。当前页面实现了浏览器信息的采集和客户端硬件信息的采集(cpu,硬盘，主板，键盘，光驱等)。在...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/shatamadedongxi">来自：	<span class="blog_title"> 筱筱的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/niaonao/article/details/51167533","strategy":"BlogCommendFromMachineLearnPai2","index":"1"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/niaonao/article/details/51167533","strategy":"BlogCommendFromMachineLearnPai2","index":"1"}'>
	<div class="content">
		<a href="https://blog.csdn.net/niaonao/article/details/51167533" target="_blank" title="Java WEB 分页实现">
		<h4 class="text-truncate oneline">
				Java WEB 分页实现		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">04-16</span>
				<span class="read-num hover-hide">
					阅读数 
					3万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/niaonao/article/details/51167533" target="_blank" title="Java WEB 分页实现">
				<span class="desc oneline">分页实现的效果：   /**/组图0-1.分页实现效果图一    /**/组图0-2.分页实现效果图二一、从效果可以看出内容由两部分组成：1.学生信息  数据库中插入一些记录，此处以学生对象为例。通过...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/niaonao">来自：	<span class="blog_title"> niaonao</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/zhmxy555/article/details/40955607","strategy":"BlogCommendFromMachineLearnPai2","index":"2"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/zhmxy555/article/details/40955607","strategy":"BlogCommendFromMachineLearnPai2","index":"2"}'>
	<div class="content">
		<a href="https://blog.csdn.net/zhmxy555/article/details/40955607" target="_blank" title="【Unity3D Shader编程】之二 雪山飞狐篇：Unity的基本Shader框架写法&amp;颜色、光照与材质">
		<h4 class="text-truncate oneline">
				【Unity3D Shader编程】之二 雪山飞狐篇：Unity的基本Shader框架写法&amp;颜色、光照与材质		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">11-09</span>
				<span class="read-num hover-hide">
					阅读数 
					9万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/zhmxy555/article/details/40955607" target="_blank" title="【Unity3D Shader编程】之二 雪山飞狐篇：Unity的基本Shader框架写法&amp;颜色、光照与材质">
				<span class="desc oneline">本篇文章中，我们学习了UnityShader的基本写法框架，以及学习了Shader中Properties（属性）的详细写法，光照、材质与颜色的具体写法。写了6个Shader作为本文Shader讲解的实...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/zhmxy555">来自：	<span class="blog_title"> 【浅墨的游戏编程Blog】毛星云（浅墨）的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/Linjingke32/article/details/80609386","strategy":"BlogCommendFromBaidu","index":"3"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/Linjingke32/article/details/80609386","strategy":"BlogCommendFromBaidu","index":"3"}'>
	<div class="content">
		<a href="https://blog.csdn.net/Linjingke32/article/details/80609386" target="_blank" title="MySQL通过UDF实现扩展功能（Linux环境和Windows环境）">
		<h4 class="text-truncate oneline">
				<em>MySQL</em>通过<em>UDF</em>实现扩展功能（Linux环境和Windows环境）		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">06-12</span>
				<span class="read-num hover-hide">
					阅读数 
					1729</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/Linjingke32/article/details/80609386" target="_blank" title="MySQL通过UDF实现扩展功能（Linux环境和Windows环境）">
				<span class="desc oneline">  最近项目数据库选型，对于自治事务这个特性，在MySQL和PostGreSQL二者摇摆了很多时间，后来，发现，通过UDF可以巧妙实现，下面来记录下过程：  环境说明：      -服务器环境:Cen...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/Linjingke32">来自：	<span class="blog_title"> JimCal</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_59" data-pid="59" data-track-view='{"mod":"kp_popu_59-860","con":",,SQL"}' data-track-click='{"mod":"kp_popu_59-860","con":",,SQL"}' data-report-view='{"mod":"kp_popu_59-860","keyword":"SQL"}' data-report-click='{"mod":"kp_popu_59-860","keyword":"SQL"}'><iframe  src="https://kunpeng-sc.csdnimg.cn/#/preview/109?positionId=59&queryWord=SQL" frameborder="0" width= "100%"  height= "75px" scrolling="no" ></iframe></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/WuLex/article/details/54868131","strategy":"BlogCommendFromBaidu","index":"4"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/WuLex/article/details/54868131","strategy":"BlogCommendFromBaidu","index":"4"}'>
	<div class="content">
		<a href="https://blog.csdn.net/WuLex/article/details/54868131" target="_blank" title="Mysql_UDF提权">
		<h4 class="text-truncate oneline">
				<em>Mysql</em>_<em>UDF</em>提权		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">02-04</span>
				<span class="read-num hover-hide">
					阅读数 
					1万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/WuLex/article/details/54868131" target="_blank" title="Mysql_UDF提权">
				<span class="desc oneline">Root权限一、上传udf.dll小于mysql5.1版本C:\WINDOWS\udf.dll或C:\WINDOWS\system32\udf.dll等于mysql5.1版本%mysql%\plugi...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/WuLex">来自：	<span class="blog_title"> 极客神殿</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_33020901/article/details/78827375","strategy":"BlogCommendFromBaidu","index":"5"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_33020901/article/details/78827375","strategy":"BlogCommendFromBaidu","index":"5"}'>
	<div class="content">
		<a href="https://blog.csdn.net/qq_33020901/article/details/78827375" target="_blank" title="Mysql udf提权(Linux平台)">
		<h4 class="text-truncate oneline">
				<em>Mysql</em> <em>udf</em>提权(Linux平台)		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-17</span>
				<span class="read-num hover-hide">
					阅读数 
					7365</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/qq_33020901/article/details/78827375" target="_blank" title="Mysql udf提权(Linux平台)">
				<span class="desc oneline">http://vinc.top/2017/04/19/mysql-udf%E6%8F%90%E6%9D%83linux%E5%B9%B3%E5%8F%B0/UDF是MySQL的一个共享库，通过udf创...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/qq_33020901">来自：	<span class="blog_title"> 3569</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/x728999452/article/details/52413974","strategy":"BlogCommendFromBaidu","index":"6"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/x728999452/article/details/52413974","strategy":"BlogCommendFromBaidu","index":"6"}'>
	<div class="content">
		<a href="https://blog.csdn.net/x728999452/article/details/52413974" target="_blank" title="MySQL 利用UDF执行命令">
		<h4 class="text-truncate oneline">
				<em>MySQL</em> 利用<em>UDF</em>执行命令		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">09-02</span>
				<span class="read-num hover-hide">
					阅读数 
					8052</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/x728999452/article/details/52413974" target="_blank" title="MySQL 利用UDF执行命令">
				<span class="desc oneline">UDF即User-DefinedFunctionslib_mysqludf_sys在github的介绍：AUDFlibrarywithfunctionstointeractwiththeoperati...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/x728999452">来自：	<span class="blog_title"> 1ame的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/210083514","strategy":"BlogCommendFromBaidu","index":"7"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/210083514","strategy":"BlogCommendFromBaidu","index":"7"}'>
	<a href="https://bbs.csdn.net/topics/210083514" target="_blank">
		<h4 class="text-truncate oneline">
				<em>MYSQL</em>用户定义函数（<em>UDF</em>）		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">04-07</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">UDF资源文件 UDF测试程序 这里解释什么是用户定义函数（UDF），是做什么的和怎样使用 1）用户定义函数（UDF）是什么？ 基本用户定义函数是一类代码，对MYSQL服务器功能进行扩充，通过添加新函</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/jc_benben/article/details/84069197","strategy":"BlogCommendFromBaidu","index":"8"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/jc_benben/article/details/84069197","strategy":"BlogCommendFromBaidu","index":"8"}'>
	<div class="content">
		<a href="https://blog.csdn.net/jc_benben/article/details/84069197" target="_blank" title="mysql UDF">
		<h4 class="text-truncate oneline">
				<em>mysql</em> <em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">11-14</span>
				<span class="read-num hover-hide">
					阅读数 
					81</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/jc_benben/article/details/84069197" target="_blank" title="mysql UDF">
				<span class="desc oneline">linux平台步骤如下：下载源码：https://github.com/mysqludf/lib_mysqludf_sys一、解压附件的压缩包之后或者配置makefileLIBDIR=/usr/lib...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/jc_benben">来自：	<span class="blog_title"> jc_benben的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_60" data-pid="60" data-track-view='{"mod":"kp_popu_60-43","con":",,"}' data-track-click='{"mod":"kp_popu_60-43","con":",,"}' data-report-view='{"mod":"kp_popu_60-43","keyword":""}' data-report-click='{"mod":"kp_popu_60-43","keyword":""}'><div id="three_ad8" class="mediav_ad" ></div>
<script type="text/javascript" src="//static.mediav.com/js/mvf_news_feed.js"></script>
<script>
                                               NEWS_FEED({
                w: 900,
                h : 84,
                showid : 'Afihld',
                placeholderId: "three_ad8",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 10,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_43689084/article/details/84963351","strategy":"BlogCommendFromBaidu","index":"9"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_43689084/article/details/84963351","strategy":"BlogCommendFromBaidu","index":"9"}'>
	<div class="content">
		<a href="https://blog.csdn.net/weixin_43689084/article/details/84963351" target="_blank" title="Mysql udf提权">
		<h4 class="text-truncate oneline">
				<em>Mysql</em> <em>udf</em>提权		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-11</span>
				<span class="read-num hover-hide">
					阅读数 
					617</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/weixin_43689084/article/details/84963351" target="_blank" title="Mysql udf提权">
				<span class="desc oneline">Mysqludf提权操作系统信息和MySQL数据库信息共同决定了udf提权时dii文件导出的位置，通过获取目标服务器的操作系统信息和MySQL数据库版本信息为后续提取奠定基础。1，获取目标操作系统信息...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/weixin_43689084">来自：	<span class="blog_title"> weixin_43689084的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/shihengzhen101/article/details/78567661","strategy":"BlogCommendFromBaidu","index":"10"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/shihengzhen101/article/details/78567661","strategy":"BlogCommendFromBaidu","index":"10"}'>
	<div class="content">
		<a href="https://blog.csdn.net/shihengzhen101/article/details/78567661" target="_blank" title="mysql函数扩展之UDF开发">
		<h4 class="text-truncate oneline">
				<em>mysql</em>函数扩展之<em>UDF</em>开发		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">11-18</span>
				<span class="read-num hover-hide">
					阅读数 
					927</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/shihengzhen101/article/details/78567661" target="_blank" title="mysql函数扩展之UDF开发">
				<span class="desc oneline">前言一开始接触到UDF是在目前开发的项目中，在项目的存储过程中接触到了这样一条sql语句：CREATEFUNCTIONXXXXXRETURNSINTEGERSONAME&quot;YYYYY.so&quot;;存储过程的...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/shihengzhen101">来自：	<span class="blog_title"> AlbertS Home of Technology</span></a>
												</span>
		</p>
	</div>
	</div>

	
			<div class="recommend-item-box blog-expert-recommend-box">
			<div class="d-flex">
				<div class="blog-expert-recommend">
					<div class="blog-expert">
						<div class="blog-expert-flexbox"></div>
					</div>
				</div>
			</div>
		</div>
	
	<div class="recommend-item-box recommend-box-ident recommend-download-box clearfix" data-report-view='{"mod":"popu_387","dest":"https://download.csdn.net/download/xb191799981/10900763","strategy":"BlogCommendFromBaidu","index":"11"}' data-report-click='{"mod":"popu_387","dest":"https://download.csdn.net/download/xb191799981/10900763","strategy":"BlogCommendFromBaidu","index":"11"}'>
		<a href="https://download.csdn.net/download/xb191799981/10900763" target="_blank">
			<div class="content clearfix">
				<div class="">
					<h4 class="text-truncate oneline clearfix">
						<em>mysql</em>_http_<em>udf</em>					</h4>
					<span class="data float-right">01-07</span>
				</div>
				<div class="desc oneline">
						描述讲解（第七步开始）： https://blog.csdn.net/xb191799981/article/details/85991094 ---查询当前共享库文件存放路径 show variab				</div>
				<span class="type-show type-show-download">下载</span>
			</div>
		</a>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/jssg_tzw/article/details/73235232","strategy":"BlogCommendFromBaidu","index":"12"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/jssg_tzw/article/details/73235232","strategy":"BlogCommendFromBaidu","index":"12"}'>
	<div class="content">
		<a href="https://blog.csdn.net/jssg_tzw/article/details/73235232" target="_blank" title="MySQL使用UDF调用shell脚本">
		<h4 class="text-truncate oneline">
				<em>MySQL</em>使用<em>UDF</em>调用shell脚本		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">06-14</span>
				<span class="read-num hover-hide">
					阅读数 
					2391</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/jssg_tzw/article/details/73235232" target="_blank" title="MySQL使用UDF调用shell脚本">
				<span class="desc oneline">在最近的项目中，由于需要使用MySQL的UDF（userdefinedfunction），这个特性从未使用过，而且个人觉得这个特性以后应该会经常使用，所以写下博文，记录和分享这个特性的用法。UDF是m...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/jssg_tzw">来自：	<span class="blog_title"> david's Blog</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
	<div class="recommend-item-box recommend-box-ident recommend-download-box clearfix" data-report-view='{"mod":"popu_387","dest":"https://download.csdn.net/download/tiancityycf/7855433","strategy":"BlogCommendFromBaidu","index":"13"}' data-report-click='{"mod":"popu_387","dest":"https://download.csdn.net/download/tiancityycf/7855433","strategy":"BlogCommendFromBaidu","index":"13"}'>
		<a href="https://download.csdn.net/download/tiancityycf/7855433" target="_blank">
			<div class="content clearfix">
				<div class="">
					<h4 class="text-truncate oneline clearfix">
						<em>mysql</em>-<em>udf</em>-http下载					</h4>
					<span class="data float-right">09-02</span>
				</div>
				<div class="desc oneline">
						mysql-udf-http下载 发现很多链接都是链接到谷歌 需要翻墙下载 在这里csdn传一份，方便大家国内下载 谢谢				</div>
				<span class="type-show type-show-download">下载</span>
			</div>
		</a>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_61" data-pid="61" data-track-view='{"mod":"kp_popu_61-557","con":",,"}' data-track-click='{"mod":"kp_popu_61-557","con":",,"}' data-report-view='{"mod":"kp_popu_61-557","keyword":""}' data-report-click='{"mod":"kp_popu_61-557","keyword":""}'><div id="three_ad13" class="mediav_ad" ></div>
<script type="text/javascript" src="//static.mediav.com/js/mvf_news_feed.js"></script>
<script>
                                               NEWS_FEED({
                w: 852,
                h : 60,
                showid : 'GNKXx7',
                placeholderId: "three_ad13",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 0,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/socho/article/details/52292064","strategy":"BlogCommendFromBaidu","index":"14"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/socho/article/details/52292064","strategy":"BlogCommendFromBaidu","index":"14"}'>
	<div class="content">
		<a href="https://blog.csdn.net/socho/article/details/52292064" target="_blank" title="通过UDF使mysql主动刷新redis缓存">
		<h4 class="text-truncate oneline">
				通过<em>UDF</em>使<em>mysql</em>主动刷新redis缓存		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">08-23</span>
				<span class="read-num hover-hide">
					阅读数 
					7973</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/socho/article/details/52292064" target="_blank" title="通过UDF使mysql主动刷新redis缓存">
				<span class="desc oneline">UDF是mysql的一个拓展接口，UDF（Userdefinedfunction）用户自定义函数。在什么地方使用这个功能呢，试想有如下场景：你的网站使用mysql作为最终数据落地的存储引擎，而redi...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/socho">来自：	<span class="blog_title"> liberalman的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/u010719917/article/details/78129755","strategy":"BlogCommendFromBaidu","index":"15"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/u010719917/article/details/78129755","strategy":"BlogCommendFromBaidu","index":"15"}'>
	<div class="content">
		<a href="https://blog.csdn.net/u010719917/article/details/78129755" target="_blank" title="centos7.3+ mysql5.6 + mysqludf安装">
		<h4 class="text-truncate oneline">
				centos7.3+ <em>mysql</em>5.6 + <em>mysql</em><em>udf</em>安装		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">09-29</span>
				<span class="read-num hover-hide">
					阅读数 
					613</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/u010719917/article/details/78129755" target="_blank" title="centos7.3+ mysql5.6 + mysqludf安装">
				<span class="desc oneline">centos7.3+mysql5.6+mysqludf安装相关连接：http://blog.csdn.net/jssg_tzw/article/details/73235232https://gith...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/u010719917">来自：	<span class="blog_title"> u010719917的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/cyantide/article/details/50828746","strategy":"BlogCommendFromBaidu","index":"16"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/cyantide/article/details/50828746","strategy":"BlogCommendFromBaidu","index":"16"}'>
	<div class="content">
		<a href="https://blog.csdn.net/cyantide/article/details/50828746" target="_blank" title="mysql表数据发生变化时，主动通知业务系统(mysql-udf-http)">
		<h4 class="text-truncate oneline">
				<em>mysql</em>表数据发生变化时，主动通知业务系统(<em>mysql</em>-<em>udf</em>-http)		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">03-08</span>
				<span class="read-num hover-hide">
					阅读数 
					8920</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/cyantide/article/details/50828746" target="_blank" title="mysql表数据发生变化时，主动通知业务系统(mysql-udf-http)">
				<span class="desc oneline">mysql-udf-http是一款简单的MySQL用户自定义函数，具有http_get()、http_post()、http_put()、http_delete()四个函数，可以在MySQL数据库中利...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/cyantide">来自：	<span class="blog_title"> 全栈进行时的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
	<div class="recommend-item-box recommend-box-ident recommend-download-box clearfix" data-report-view='{"mod":"popu_387","dest":"https://download.csdn.net/download/xiangchengguan/10698754","strategy":"BlogCommendFromBaidu","index":"17"}' data-report-click='{"mod":"popu_387","dest":"https://download.csdn.net/download/xiangchengguan/10698754","strategy":"BlogCommendFromBaidu","index":"17"}'>
		<a href="https://download.csdn.net/download/xiangchengguan/10698754" target="_blank">
			<div class="content clearfix">
				<div class="">
					<h4 class="text-truncate oneline clearfix">
						<em>MySql</em>-Json-<em>Udf</em>					</h4>
					<span class="data float-right">10-01</span>
				</div>
				<div class="desc oneline">
						mysql5.7+的版本已经内部支持json，然后很多生产环境的mysql还是5.7以下的版本，但需求中要使用JSON，又不想升级mysql版本，毕竟运行稳定的系统没有必要承担升级风险。那如何在5.7				</div>
				<span class="type-show type-show-download">下载</span>
			</div>
		</a>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/bcfdsagbfcisbg/article/details/78296446","strategy":"BlogCommendFromBaidu","index":"18"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/bcfdsagbfcisbg/article/details/78296446","strategy":"BlogCommendFromBaidu","index":"18"}'>
	<div class="content">
		<a href="https://blog.csdn.net/bcfdsagbfcisbg/article/details/78296446" target="_blank" title="mysql-udf-http问题">
		<h4 class="text-truncate oneline">
				<em>mysql</em>-<em>udf</em>-http问题		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">10-20</span>
				<span class="read-num hover-hide">
					阅读数 
					759</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/bcfdsagbfcisbg/article/details/78296446" target="_blank" title="mysql-udf-http问题">
				<span class="desc oneline">最近在使用mysql-udf-http设置触发器并发布http消息时，遇到一个问题：http服务端每次都会收到2条消息，开始以为是发布消息的方式有问题，测试以后发现没有错，然后想到可能是触发器重复，最...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/bcfdsagbfcisbg">来自：	<span class="blog_title"> geek人生</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_62" data-pid="62" data-track-view='{"mod":"kp_popu_62-1062","con":",,"}' data-track-click='{"mod":"kp_popu_62-1062","con":",,"}' data-report-view='{"mod":"kp_popu_62-1062","keyword":""}' data-report-click='{"mod":"kp_popu_62-1062","keyword":""}'><iframe  src="https://kunpeng-sc.csdnimg.cn/#/preview/237?positionId=62&queryWord=" frameborder="0" width= "100%"  height= "75px" scrolling="no" ></iframe></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/hcmsxy/article/details/2670528","strategy":"BlogCommendFromBaidu","index":"19"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/hcmsxy/article/details/2670528","strategy":"BlogCommendFromBaidu","index":"19"}'>
	<div class="content">
		<a href="https://blog.csdn.net/hcmsxy/article/details/2670528" target="_blank" title="Mysql UDF ">
		<h4 class="text-truncate oneline">
				<em>Mysql</em> <em>UDF</em> 		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-18</span>
				<span class="read-num hover-hide">
					阅读数 
					1278</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/hcmsxy/article/details/2670528" target="_blank" title="Mysql UDF ">
				<span class="desc oneline">MysqlUDF(User-DefinedFunctionInterface)，可以用于Mysql功能扩展。一般来说使用C/C++实现。   这里实现一个名字为fx_msg的function.主要功能...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/hcmsxy">来自：	<span class="blog_title"> hcmsxy的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/u013806647/article/details/20941425","strategy":"BlogCommendFromBaidu","index":"20"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/u013806647/article/details/20941425","strategy":"BlogCommendFromBaidu","index":"20"}'>
	<div class="content">
		<a href="https://blog.csdn.net/u013806647/article/details/20941425" target="_blank" title="一、REST架构风格：">
		<h4 class="text-truncate oneline">
				一、REST架构风格：		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">03-10</span>
				<span class="read-num hover-hide">
					阅读数 
					75</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/u013806647/article/details/20941425" target="_blank" title="一、REST架构风格：">
				<span class="desc oneline">一、REST架构风格：　　REST（RepresentationalStateTransfer）是一种轻量级的WebService架构风格，其实现和操作明显比SOAP和XML-RPC更为简洁，可以完全...</span>
			</a>
			<span class="blog_title_box oneline no-title">
									<span class="type-show type-show-blog type-show-after">博文</span>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/u010543785/article/details/53467909","strategy":"BlogCommendFromBaidu","index":"21"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/u010543785/article/details/53467909","strategy":"BlogCommendFromBaidu","index":"21"}'>
	<div class="content">
		<a href="https://blog.csdn.net/u010543785/article/details/53467909" target="_blank" title="Mysql安装udf调用系统程序问题解决">
		<h4 class="text-truncate oneline">
				<em>Mysql</em>安装<em>udf</em>调用系统程序问题解决		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-05</span>
				<span class="read-num hover-hide">
					阅读数 
					3706</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/u010543785/article/details/53467909" target="_blank" title="Mysql安装udf调用系统程序问题解决">
				<span class="desc oneline">安装udf调用系统程序，在使用编译出的lib_mysqludf_sys.so遇到了1.failed:FUNCTIONramsdb.sys_execdoesnotexist!2.ERROR1126(HY...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/u010543785">来自：	<span class="blog_title"> 暴烈骑士的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/luoqiya/article/details/12888553","strategy":"BlogCommendFromBaidu","index":"22"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/luoqiya/article/details/12888553","strategy":"BlogCommendFromBaidu","index":"22"}'>
	<div class="content">
		<a href="https://blog.csdn.net/luoqiya/article/details/12888553" target="_blank" title="关于Mysql中UDF函数的思考（一）">
		<h4 class="text-truncate oneline">
				关于<em>Mysql</em>中<em>UDF</em>函数的思考（一）		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">10-25</span>
				<span class="read-num hover-hide">
					阅读数 
					1万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/luoqiya/article/details/12888553" target="_blank" title="关于Mysql中UDF函数的思考（一）">
				<span class="desc oneline">一点背景从大学二年纪接触编程，几乎我阅读过的所有的编程语言教材都会有那么一章专门讲述数据库编程，而讲述的内容都无非是介绍某个数据库历史，对应的安装过程，最后才会讲解一点SQL语句，像这样的教材我个人认...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/luoqiya">来自：	<span class="blog_title"> luoqiya的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
	<div class="recommend-item-box recommend-box-ident recommend-download-box clearfix" data-report-view='{"mod":"popu_387","dest":"https://download.csdn.net/download/cyantide/9455805","strategy":"BlogCommendFromBaidu","index":"23"}' data-report-click='{"mod":"popu_387","dest":"https://download.csdn.net/download/cyantide/9455805","strategy":"BlogCommendFromBaidu","index":"23"}'>
		<a href="https://download.csdn.net/download/cyantide/9455805" target="_blank">
			<div class="content clearfix">
				<div class="">
					<h4 class="text-truncate oneline clearfix">
						<em>mysql</em>-<em>udf</em>-http					</h4>
					<span class="data float-right">03-08</span>
				</div>
				<div class="desc oneline">
						mysql-udf-http				</div>
				<span class="type-show type-show-download">下载</span>
			</div>
		</a>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_63" data-pid="63" data-track-view='{"mod":"kp_popu_63-555","con":",,"}' data-track-click='{"mod":"kp_popu_63-555","con":",,"}' data-report-view='{"mod":"kp_popu_63-555","keyword":""}' data-report-click='{"mod":"kp_popu_63-555","keyword":""}'><div id="three_ad23" class="mediav_ad" ></div>
<script type="text/javascript" src="//static.mediav.com/js/mvf_news_feed.js"></script>
<script>
                                               NEWS_FEED({
                w: 852,
                h : 60,
                showid : 'GNKXx7',
                placeholderId: "three_ad23",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 0,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/whyrun/article/details/8592071","strategy":"BlogCommendFromBaidu","index":"24"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/whyrun/article/details/8592071","strategy":"BlogCommendFromBaidu","index":"24"}'>
	<div class="content">
		<a href="https://blog.csdn.net/whyrun/article/details/8592071" target="_blank" title="教你写MySQL UDF">
		<h4 class="text-truncate oneline">
				教你写<em>MySQL</em> <em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">02-19</span>
				<span class="read-num hover-hide">
					阅读数 
					758</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/whyrun/article/details/8592071" target="_blank" title="教你写MySQL UDF">
				<span class="desc oneline">转自：http://blogread.cn/it/article/731?f=wb第一次听说UDF是，一片懵懂。还被一个半桶水的培训师忽悠说是存储函数即是UDF。现在想来真是匪夷所思，害人不浅。从名字...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/whyrun">来自：	<span class="blog_title"> whyrun的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/swotcoder/article/details/18524","strategy":"BlogCommendFromBaidu","index":"25"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/swotcoder/article/details/18524","strategy":"BlogCommendFromBaidu","index":"25"}'>
	<div class="content">
		<a href="https://blog.csdn.net/swotcoder/article/details/18524" target="_blank" title="Windows上的MySQL UDF开发">
		<h4 class="text-truncate oneline">
				Windows上的<em>MySQL</em> <em>UDF</em>开发		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">05-18</span>
				<span class="read-num hover-hide">
					阅读数 
					1926</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/swotcoder/article/details/18524" target="_blank" title="Windows上的MySQL UDF开发">
				<span class="desc oneline">曾以为Windows版本的MySQL存在不能使用UDF的BUG诸提交了一个bug报告。不过似乎发现是我搞错了，MySQL的技术支持人员给了非常完美的解答，同大家分享一下。下边是原文回复:)Sorryt...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/swotcoder">来自：	<span class="blog_title"> swotcoder的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/mypcstyle/article/details/37511991","strategy":"BlogCommendFromBaidu","index":"26"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/mypcstyle/article/details/37511991","strategy":"BlogCommendFromBaidu","index":"26"}'>
	<div class="content">
		<a href="https://blog.csdn.net/mypcstyle/article/details/37511991" target="_blank" title="MySQL使用udf调用系统程序">
		<h4 class="text-truncate oneline">
				<em>MySQL</em>使用<em>udf</em>调用系统程序		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-07</span>
				<span class="read-num hover-hide">
					阅读数 
					7387</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/mypcstyle/article/details/37511991" target="_blank" title="MySQL使用udf调用系统程序">
				<span class="desc oneline">需要在mysql里调用系统程序执行，这个功能mysql默认不提供，但可以通过定义udf（自定义函数）实现。好在开源社区里已经有人为我们实现这个程序了。1.下载lib_mysqludf_sys程序：ht...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/mypcstyle">来自：	<span class="blog_title"> mypcstyle的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/lidan3959/article/details/17264405","strategy":"BlogCommendFromBaidu","index":"27"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/lidan3959/article/details/17264405","strategy":"BlogCommendFromBaidu","index":"27"}'>
	<div class="content">
		<a href="https://blog.csdn.net/lidan3959/article/details/17264405" target="_blank" title="MySQL 加载UDF（自定义函数）">
		<h4 class="text-truncate oneline">
				<em>MySQL</em> 加载<em>UDF</em>（自定义函数）		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-11</span>
				<span class="read-num hover-hide">
					阅读数 
					2473</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/lidan3959/article/details/17264405" target="_blank" title="MySQL 加载UDF（自定义函数）">
				<span class="desc oneline">我们神一样的研发这几天抱怨mysql提供的功能太少，然后就动手自己写UDF并加载到mysql中。至于神马是MYSQLUDF以及作用可详见：http://dev.mysql.com/doc/refman...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/lidan3959">来自：	<span class="blog_title"> lidan3959的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/u010003835/article/details/81061563","strategy":"BlogCommendFromBaidu","index":"28"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/u010003835/article/details/81061563","strategy":"BlogCommendFromBaidu","index":"28"}'>
	<div class="content">
		<a href="https://blog.csdn.net/u010003835/article/details/81061563" target="_blank" title="Hive_UDF开发指南">
		<h4 class="text-truncate oneline">
				Hive_<em>UDF</em>开发指南		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-16</span>
				<span class="read-num hover-hide">
					阅读数 
					3426</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/u010003835/article/details/81061563" target="_blank" title="Hive_UDF开发指南">
				<span class="desc oneline">最近在看《Hive编程指南》其中提到了对Hive自定义函数的几种扩展，对于我们日常开发，这个功能还是非常有用的。打算细致的研究一下，这里我们将研究结果整理成博客，方便大家理解：参考文章：HiveUDF...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/u010003835">来自：	<span class="blog_title"> 迎难而上</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_64" data-pid="64" data-track-view='{"mod":"kp_popu_64-1060","con":",,"}' data-track-click='{"mod":"kp_popu_64-1060","con":",,"}' data-report-view='{"mod":"kp_popu_64-1060","keyword":""}' data-report-click='{"mod":"kp_popu_64-1060","keyword":""}'><iframe  src="https://kunpeng-sc.csdnimg.cn/#/preview/235?positionId=64&queryWord=" frameborder="0" width= "100%"  height= "75px" scrolling="no" ></iframe></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/liu82327114/article/details/80670415","strategy":"BlogCommendFromBaidu","index":"29"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/liu82327114/article/details/80670415","strategy":"BlogCommendFromBaidu","index":"29"}'>
	<div class="content">
		<a href="https://blog.csdn.net/liu82327114/article/details/80670415" target="_blank" title="udf开发入门（python udf、hive udf）">
		<h4 class="text-truncate oneline">
				<em>udf</em>开发入门（python <em>udf</em>、hive <em>udf</em>）		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">06-12</span>
				<span class="read-num hover-hide">
					阅读数 
					6135</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/liu82327114/article/details/80670415" target="_blank" title="udf开发入门（python udf、hive udf）">
				<span class="desc oneline">开发前的声明udf开发是在数据分析的时候如果内置的函数解析不了的情况下去做的开发，比方说你只想拆分一个字段，拼接一个字段之类的，就不要去搞udf了，这种基本的需求自带函数完全支持，具体参数可参考文档：...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/liu82327114">来自：	<span class="blog_title"> liu82327114的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/YQlakers/article/details/70211522","strategy":"BlogCommendFromBaidu","index":"30"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/YQlakers/article/details/70211522","strategy":"BlogCommendFromBaidu","index":"30"}'>
	<div class="content">
		<a href="https://blog.csdn.net/YQlakers/article/details/70211522" target="_blank" title="Hive的UDF是什么？">
		<h4 class="text-truncate oneline">
				Hive的<em>UDF</em>是什么？		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">04-17</span>
				<span class="read-num hover-hide">
					阅读数 
					2万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/YQlakers/article/details/70211522" target="_blank" title="Hive的UDF是什么？">
				<span class="desc oneline">首先我们学习hadoop的时候，为了让我们不太会java语言但是对SQL很熟悉的工程师能够操作基本的mapreduce计算过程，Hive被设计出来了。Hive就好比是hadoop在执行MR（mapre...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/YQlakers">来自：	<span class="blog_title"> YQlakers的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392466225","strategy":"BlogCommendFromBaidu","index":"31"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392466225","strategy":"BlogCommendFromBaidu","index":"31"}'>
	<a href="https://bbs.csdn.net/topics/392466225" target="_blank">
		<h4 class="text-truncate oneline">
				hive引入<em>udf</em>函数到classpath，创建临时函数的时候找不到类		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">10-23</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">在idea中写了一个MyConcat类，打包后放到了centos中，然后在hive中执行add jar **/MyConcat.jar，之后list jars可以找到这个jar包，但是执行create</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_39963880/article/details/82784492","strategy":"BlogCommendFromBaidu","index":"32"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_39963880/article/details/82784492","strategy":"BlogCommendFromBaidu","index":"32"}'>
	<div class="content">
		<a href="https://blog.csdn.net/qq_39963880/article/details/82784492" target="_blank" title="UDF概述">
		<h4 class="text-truncate oneline">
				<em>UDF</em>概述		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">09-20</span>
				<span class="read-num hover-hide">
					阅读数 
					443</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/qq_39963880/article/details/82784492" target="_blank" title="UDF概述">
				<span class="desc oneline">UDF概述UDF全称为UserDefinedFunction，即用户自定义函数。MaxCompute提供很多内建函数来满足您的计算需求，同时您还可以通过创建自定义函数来满足不同的计算需求。UDF在使用...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/qq_39963880">来自：	<span class="blog_title"> qq_39963880的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_40161254/article/details/91526989","strategy":"BlogCommendFromBaidu","index":"33"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_40161254/article/details/91526989","strategy":"BlogCommendFromBaidu","index":"33"}'>
	<div class="content">
		<a href="https://blog.csdn.net/weixin_40161254/article/details/91526989" target="_blank" title="UDF">
		<h4 class="text-truncate oneline">
				<em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">06-12</span>
				<span class="read-num hover-hide">
					阅读数 
					112</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/weixin_40161254/article/details/91526989" target="_blank" title="UDF">
				<span class="desc oneline">转：UDF概述UDF全称为UserDefinedFunction，即用户自定义函数。MaxCompute提供很多内建函数来满足您的计算需求，同时您还可以通过创建自定义函数来满足不同的计算需求。UDF在...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/weixin_40161254">来自：	<span class="blog_title"> 花木兰</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_65" data-pid="65" data-track-view='{"mod":"kp_popu_65-84","con":",,"}' data-track-click='{"mod":"kp_popu_65-84","con":",,"}' data-report-view='{"mod":"kp_popu_65-84","keyword":""}' data-report-click='{"mod":"kp_popu_65-84","keyword":""}'><div id="three_ad33" class="mediav_ad" ></div>
<script>
                                               NEWS_FEED({
                w: 852,
                h : 60,
                showid : 'GNKXx7',
                placeholderId: "three_ad33",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 0,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392172657","strategy":"BlogCommendFromBaidu","index":"34"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392172657","strategy":"BlogCommendFromBaidu","index":"34"}'>
	<a href="https://bbs.csdn.net/topics/392172657" target="_blank">
		<h4 class="text-truncate oneline">
				hive自定义<em>udf</em>函数，在<em>udf</em>函数内怎么读取hive表数据		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">05-24</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">我想实现一个udf函数，传入一个参数，去读取hive自己的表数据进行业务测试 package com.hive; import java.sql.Connection; import java.sql</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/20297854","strategy":"BlogCommendFromBaidu","index":"35"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/20297854","strategy":"BlogCommendFromBaidu","index":"35"}'>
	<a href="https://bbs.csdn.net/topics/20297854" target="_blank">
		<h4 class="text-truncate oneline">
				Interbase 入门问题 n 问 (3)-- <em>UDF</em> 函数！		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">01-20</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">Interbase 没有提供几个像样的函数，但是提供了UDF功能，IB的目录下有一个IB_UDF，我想问如何在IB中使用他们？ 为什么IB不想MSSQL那样定一些现成的函数？</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_36119192/article/details/84863268","strategy":"BlogCommendFromBaidu","index":"36"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_36119192/article/details/84863268","strategy":"BlogCommendFromBaidu","index":"36"}'>
	<div class="content">
		<a href="https://blog.csdn.net/qq_36119192/article/details/84863268" target="_blank" title="UDF提权">
		<h4 class="text-truncate oneline">
				<em>UDF</em>提权		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-06</span>
				<span class="read-num hover-hide">
					阅读数 
					861</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/qq_36119192/article/details/84863268" target="_blank" title="UDF提权">
				<span class="desc oneline">目录UDFUDF提权UDFUDF(userdefinedfunction)，即用户自定义函数。是通过添加新函数，对MySQL的功能进行扩充，其实就像使用本地MySQL函数如 user()或concat...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/qq_36119192">来自：	<span class="blog_title"> 谢公子的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/sky_walker85/article/details/35999955","strategy":"BlogCommendFromBaidu","index":"37"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/sky_walker85/article/details/35999955","strategy":"BlogCommendFromBaidu","index":"37"}'>
	<div class="content">
		<a href="https://blog.csdn.net/sky_walker85/article/details/35999955" target="_blank" title="Hive学习之部署UDF的四种方法">
		<h4 class="text-truncate oneline">
				Hive学习之部署<em>UDF</em>的四种方法		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">06-30</span>
				<span class="read-num hover-hide">
					阅读数 
					6977</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/sky_walker85/article/details/35999955" target="_blank" title="Hive学习之部署UDF的四种方法">
				<span class="desc oneline">在向Hive添加自定义的UDF或者添加Hive自带的类，如GenericUDFDBOutput时，需要将包含UDF类的Jar包添加到Hive环境中，这样就可以使用Create[temporary]fu...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/sky_walker85">来自：	<span class="blog_title"> skyWalker_ONLY</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392673474","strategy":"BlogCommendFromBaidu","index":"38"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392673474","strategy":"BlogCommendFromBaidu","index":"38"}'>
	<a href="https://bbs.csdn.net/topics/392673474" target="_blank">
		<h4 class="text-truncate oneline">
				<em>udf</em>自定义函数使用异常		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">06-01</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">最近在写一个ansj分词的udf函数，在java上测试成功，但打完jar包后在hive上运行时报错，不知道怎么处理。 java代码如下： package com.afan; import java.u</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_66" data-pid="66" data-track-view='{"mod":"kp_popu_66-87","con":",,"}' data-track-click='{"mod":"kp_popu_66-87","con":",,"}' data-report-view='{"mod":"kp_popu_66-87","keyword":""}' data-report-click='{"mod":"kp_popu_66-87","keyword":""}'><div id="three_ad38" class="mediav_ad" ></div>
<script>
                                               NEWS_FEED({
                w: 852,
                h : 60,
                showid : 'Afihld',
                placeholderId: "three_ad38",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 18,
                    titleFontColor: '#000',
                    titleFontFamily : 'Lato,-apple-system,SF UI Text,Arial,PingFang SC,Hiragino Sans GB,Microsoft YaHei,WenQuanYi Micro Hei,sans-serif',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 0,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_37408712/article/details/81042669","strategy":"BlogCommendFromBaidu","index":"39"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_37408712/article/details/81042669","strategy":"BlogCommendFromBaidu","index":"39"}'>
	<div class="content">
		<a href="https://blog.csdn.net/qq_37408712/article/details/81042669" target="_blank" title="Hive 函数UDF开发以及永久注册UDF函数">
		<h4 class="text-truncate oneline">
				Hive 函数<em>UDF</em>开发以及永久注册<em>UDF</em>函数		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-14</span>
				<span class="read-num hover-hide">
					阅读数 
					2374</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/qq_37408712/article/details/81042669" target="_blank" title="Hive 函数UDF开发以及永久注册UDF函数">
				<span class="desc oneline">explode：（把一串数据转换成多行的数据）创建一个文本：[hadoop@ruozehadoop000data]$vihive-wc.txthello,world,welcomehello,welc...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/qq_37408712">来自：	<span class="blog_title"> 烙痕丷的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_33792843/article/details/74945718","strategy":"BlogCommendFromBaidu","index":"40"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/qq_33792843/article/details/74945718","strategy":"BlogCommendFromBaidu","index":"40"}'>
	<div class="content">
		<a href="https://blog.csdn.net/qq_33792843/article/details/74945718" target="_blank" title="Hive开发UDF">
		<h4 class="text-truncate oneline">
				Hive开发<em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-11</span>
				<span class="read-num hover-hide">
					阅读数 
					8996</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/qq_33792843/article/details/74945718" target="_blank" title="Hive开发UDF">
				<span class="desc oneline">Hive开发UDF从无到有开发hive的udf，本篇不针对简单的，针对复杂参数目录：addjar/opt/workspace/udf/GetAppUDF.jar;小坑，路径一定要写对，之前出现文件找不...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/qq_33792843">来自：	<span class="blog_title"> 大壮的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/scgaliguodong123_/article/details/46993005","strategy":"BlogCommendFromBaidu","index":"41"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/scgaliguodong123_/article/details/46993005","strategy":"BlogCommendFromBaidu","index":"41"}'>
	<div class="content">
		<a href="https://blog.csdn.net/scgaliguodong123_/article/details/46993005" target="_blank" title="Hive自定义函数(UDF、UDAF)">
		<h4 class="text-truncate oneline">
				Hive自定义函数(<em>UDF</em>、UDAF)		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-21</span>
				<span class="read-num hover-hide">
					阅读数 
					1万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/scgaliguodong123_/article/details/46993005" target="_blank" title="Hive自定义函数(UDF、UDAF)">
				<span class="desc oneline">当Hive提供的内置函数无法满足你的业务处理需要时，此时就可以考虑使用用户自定义函数。UDF用户自定义函数（userdefinedfunction)–针对单条记录。创建函数流程1、自定义一个Java类...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/scgaliguodong123_">来自：	<span class="blog_title"> 琴弦上、漫步</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392192511","strategy":"BlogCommendFromBaidu","index":"42"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/392192511","strategy":"BlogCommendFromBaidu","index":"42"}'>
	<a href="https://bbs.csdn.net/topics/392192511" target="_blank">
		<h4 class="text-truncate oneline">
				Hive <em>UDF</em>函数报错，类路径中没有<em>UDF</em>函数的路径		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">07-13</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">这两天遇到了一个比较诡异的问题，就是编辑Hive的UDF函数，并提交需要执行MapReduce的SQL后，提示报错 org.apache.hadoop.hive.ql.exec.UDFArgument</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/lotusws/article/details/52432988","strategy":"BlogCommendFromBaidu","index":"43"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/lotusws/article/details/52432988","strategy":"BlogCommendFromBaidu","index":"43"}'>
	<div class="content">
		<a href="https://blog.csdn.net/lotusws/article/details/52432988" target="_blank" title="SparkSQL UDF 两种方式：udf() 和 register()">
		<h4 class="text-truncate oneline">
				SparkSQL <em>UDF</em> 两种方式：<em>udf</em>() 和 register()		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">09-04</span>
				<span class="read-num hover-hide">
					阅读数 
					7595</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/lotusws/article/details/52432988" target="_blank" title="SparkSQL UDF 两种方式：udf() 和 register()">
				<span class="desc oneline">1）调用sqlContext.udf.register()此时注册的方法只能在sql()中可见，对DataFrameAPI不可见用法：sqlContext.udf.register(&quot;makeDt&quot;,...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/lotusws">来自：	<span class="blog_title"> 要努力啊</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_67" data-pid="67" data-track-view='{"mod":"kp_popu_67-653","con":",,"}' data-track-click='{"mod":"kp_popu_67-653","con":",,"}' data-report-view='{"mod":"kp_popu_67-653","keyword":""}' data-report-click='{"mod":"kp_popu_67-653","keyword":""}'><div id="three_ad43" class="mediav_ad" ></div>
<script>
                                               NEWS_FEED({
                w: 900,
                h : 84,
                showid : '9gAEHz',
                placeholderId: "three_ad43",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 16,
                    titleFontColor: '#000',
                    titleFontFamily : 'Microsoft Yahei',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 12,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 10,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/lj_0911/article/details/80985019","strategy":"BlogCommendFromBaidu","index":"44"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/lj_0911/article/details/80985019","strategy":"BlogCommendFromBaidu","index":"44"}'>
	<div class="content">
		<a href="https://blog.csdn.net/lj_0911/article/details/80985019" target="_blank" title="自定义UDF函数实现字符串转json格式">
		<h4 class="text-truncate oneline">
				自定义<em>UDF</em>函数实现字符串转json格式		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">07-10</span>
				<span class="read-num hover-hide">
					阅读数 
					413</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/lj_0911/article/details/80985019" target="_blank" title="自定义UDF函数实现字符串转json格式">
				<span class="desc oneline">步骤：1.idea创建maven工程2.pom.xml文件配置如下依赖&amp;amp;lt;!--添加hadoop依赖--&amp;amp;gt;&amp;amp;lt;dependency&amp;amp;gt;&amp;amp;lt;...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/lj_0911">来自：	<span class="blog_title"> lj_0911的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/dkl12/article/details/81381151","strategy":"BlogCommendFromBaidu","index":"45"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/dkl12/article/details/81381151","strategy":"BlogCommendFromBaidu","index":"45"}'>
	<div class="content">
		<a href="https://blog.csdn.net/dkl12/article/details/81381151" target="_blank" title="Spark UDF使用详解及代码示例">
		<h4 class="text-truncate oneline">
				Spark <em>UDF</em>使用详解及代码示例		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">08-03</span>
				<span class="read-num hover-hide">
					阅读数 
					7369</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/dkl12/article/details/81381151" target="_blank" title="Spark UDF使用详解及代码示例">
				<span class="desc oneline">我的原创地址：https://dongkelun.com/2018/08/02/sparkUDF/前言本文介绍如何在SparkSql和DataFrame中使用UDF，如何利用UDF给一个表或者一个Da...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/dkl12">来自：	<span class="blog_title"> 董可伦</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/Allenalex/article/details/49786347","strategy":"BlogCommendFromBaidu","index":"46"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/Allenalex/article/details/49786347","strategy":"BlogCommendFromBaidu","index":"46"}'>
	<div class="content">
		<a href="https://blog.csdn.net/Allenalex/article/details/49786347" target="_blank" title="手把手教你定义一个UDF">
		<h4 class="text-truncate oneline">
				手把手教你定义一个<em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">11-11</span>
				<span class="read-num hover-hide">
					阅读数 
					4856</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/Allenalex/article/details/49786347" target="_blank" title="手把手教你定义一个UDF">
				<span class="desc oneline">本文目的为告诉读者在如何通过java实现一个UDF—&gt;在linux下如何将该UDF打包成一个jar—&gt;在hive中如何引入这个jar—&gt;以及在此基础上定义函数。相信读者读完本文，一定可以自己实际定义任...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/Allenalex">来自：	<span class="blog_title"> 但行好事，莫问前程</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_33763244/article/details/91962264","strategy":"BlogCommendFromBaidu","index":"47"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/weixin_33763244/article/details/91962264","strategy":"BlogCommendFromBaidu","index":"47"}'>
	<div class="content">
		<a href="https://blog.csdn.net/weixin_33763244/article/details/91962264" target="_blank" title="Hive自定义UDF和聚合函数UDAF">
		<h4 class="text-truncate oneline">
				Hive自定义<em>UDF</em>和聚合函数UDAF		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">12-29</span>
				<span class="read-num hover-hide">
					阅读数 
					17</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/weixin_33763244/article/details/91962264" target="_blank" title="Hive自定义UDF和聚合函数UDAF">
				<span class="desc oneline">2019独角兽企业重金招聘Python工程师标准&amp;gt;&amp;gt;&amp;gt;...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/weixin_33763244">来自：	<span class="blog_title"> weixin_33763244的博客</span></a>
												</span>
		</p>
	</div>
	</div>

	
	
<div class="recommend-item-box type_blog clearfix" data-report-view='{"mod":"popu_387","dest":"https://blog.csdn.net/yfkiss/article/details/7885262","strategy":"BlogCommendFromBaidu","index":"48"}' data-report-click='{"mod":"popu_387","dest":"https://blog.csdn.net/yfkiss/article/details/7885262","strategy":"BlogCommendFromBaidu","index":"48"}'>
	<div class="content">
		<a href="https://blog.csdn.net/yfkiss/article/details/7885262" target="_blank" title="hive UDF">
		<h4 class="text-truncate oneline">
				hive <em>UDF</em>		</h4>
		<div class="info-box d-flex align-content-center">
			<p class="date-and-readNum oneline">
				<span class="date hover-show">01-21</span>
				<span class="read-num hover-hide">
					阅读数 
					4万+</span>
				</p>
			</div>
		</a>
		<p class="content">
			<a href="https://blog.csdn.net/yfkiss/article/details/7885262" target="_blank" title="hive UDF">
				<span class="desc oneline">HIVE允许用户使用UDF（userdefinedfunction）对数据进行处理。用户可以使用‘showfunctions’查看functionlist，可以使用'describefunctionf...</span>
			</a>
			<span class="blog_title_box oneline ">
									<span class="type-show type-show-blog type-show-after">博文</span>
											<a target="_blank" href="https://blog.csdn.net/yfkiss">来自：	<span class="blog_title"> yfk的专栏</span></a>
												</span>
		</p>
	</div>
	</div>

	<div class="recommend-item-box recommend-ad-box"><div id="kp_box_68" data-pid="68" data-track-view='{"mod":"kp_popu_68-654","con":",,"}' data-track-click='{"mod":"kp_popu_68-654","con":",,"}' data-report-view='{"mod":"kp_popu_68-654","keyword":""}' data-report-click='{"mod":"kp_popu_68-654","keyword":""}'><div id="three_ad48" class="mediav_ad" ></div>
<script>
                                               NEWS_FEED({
                w: 900,
                h : 84,
                showid : 'Afihld',
                placeholderId: "three_ad48",
                inject : 'define',
                define : {
                    imagePosition : 'left',
                    imageBorderRadius : 3,
                    imageWidth: 90,
                    imageHeight: 60,
                    imageFill : 'clip',
                    displayImage : true,
                    displayTitle : true,
                    titleFontSize: 16,
                    titleFontColor: '#000',
                    titleFontFamily : 'Microsoft Yahei',
                    titleFontWeight: 'bold',
                    titlePaddingTop : 0,
                    titlePaddingRight : 0,
                    titlePaddingBottom : 5,
                    titlePaddingLeft : 16,
                    displayDesc : true,
                    descFontSize: 14,
                    descFontColor: '#8e959a',
                    descFontFamily : 'Microsoft Yahei',
                    paddingTop : 10,
                    paddingRight : 0,
                    paddingBottom : 0,
                    paddingLeft : 0,
                    backgroundColor: '#fff',
                    hoverColor: '#000'
                      }
                  })
                                        </script></div></div>
	
<div class="recommend-item-box recommend-box-ident recommend-other-item-box" data-report-view='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/390813979","strategy":"BlogCommendFromBaidu","index":"49"}' data-report-click='{"mod":"popu_387","dest":"https://bbs.csdn.net/topics/390813979","strategy":"BlogCommendFromBaidu","index":"49"}'>
	<a href="https://bbs.csdn.net/topics/390813979" target="_blank">
		<h4 class="text-truncate oneline">
				hive利用<em>udf</em>函数将Hive统计结果直接插入到<em>MySQL</em>,导死了，急求答案！！！		</h4>
		<div class="info-box d-flex align-content-center">
				<span class="date">06-17</span>
		</div>
		<p class="content oneline">
			<span class="desc oneline">今天利用udf函数将Hive统计结果直接插入到MySQL，死活导入不了。mysql数据库编码：utf-8 hive编码utf-8,有中文字段。遇到的问题是：中文字段导入不了。修改成英文字段后，导入状态</span>
							<span class="type-show type-show-bbs">论坛</span>
					</p>
	</a>

</div>

	
	
                <div class="recommend-item-box type_hot_word">
                                <div class="content clearfix">
                    <div class="word float-left">
                                                            <span>
                        <a href="https://edu.csdn.net/courses/o5329_s5330_k " target="_blank">
                        机器学习教程                    </a></span>
                                                                                <span>
                        <a href="https://edu.csdn.net/courses/o280_s351_k " target="_blank">
                        Objective-C培训                    </a></span>
                                                                                <span>
                        <a href="https://edu.csdn.net/combos/o7115_s388_l0_t " target="_blank">
                        交互设计视频教程                    </a></span>
                                                                                <span>
                        <a href="https://edu.csdn.net/course/play/5599/104252 " target="_blank">
                        颜色模型                    </a></span>
                                                                                <span>
                        <a href="https://edu.csdn.net/combos/o363_l0_t " target="_blank">
                        设计制作学习                    </a></span>
                                                            </div>
                </div>
                                                </div>
                            <div class="recommend-loading-box">
                <img src='https://csdnimg.cn/release/phoenix/images/feedLoading.gif'>
            </div>
            <div class="recommend-end-box">
                <p class="text-center">没有更多推荐了，<a href="https://blog.csdn.net/" class="c-blue c-blue-hover c-blue-focus">返回首页</a></p>
            </div>
        </div>
    </main>

    <aside>
	<div id="asideProfile" class="aside-box">
    <!-- <h3 class="aside-title">个人资料</h3> -->
    <div class="profile-intro d-flex">
        <div class="avatar-box d-flex justify-content-center flex-column">
            <a href="https://blog.csdn.net/shaoyiwenet">
              <img src="https://avatar.csdn.net/A/D/A/3_shaoyiwenet.jpg" class="avatar_pic">
                              <img src="https://g.csdnimg.cn/static/user-reg-year/1x/7.png" class="user-years">
                          </a>
            
        </div>
        <div class="user-info d-flex justify-content-center flex-column">
            <p class="name csdn-tracking-statistics tracking-click" data-report-click='{"mod":"popu_379"}'>
                <a href="https://blog.csdn.net/shaoyiwenet"  class="" id="uid">YiwenShao</a>
            </p>
                    </div>
                <div class="opt-box d-flex justify-content-center flex-column">
            <span  class="csdn-tracking-statistics tracking-click" data-report-click='{"mod":"popu_379"}'>
                                    <a class="btn btn-sm btn-red-hollow attention" id="btnAttent">关注</a>
                            </span>
        </div>
            </div>
    <div class="data-info d-flex item-tiling">
                <dl class="text-center" title="19">
                        <dt><a href="https://blog.csdn.net/shaoyiwenet?t=1">原创</a></dt>
            <dd><a href="https://blog.csdn.net/shaoyiwenet?t=1"><span class="count">19</span></a></dd>
                    </dl>
        <dl class="text-center" id="fanBox" title="11">
            <dt>粉丝</dt>
            <dd><span class="count" id="fan">11</span></dd>
        </dl>
        <dl class="text-center" title="5">
            <dt>喜欢</dt>
            <dd><span class="count">5</span></dd>
        </dl>
        <dl class="text-center" title="11">
            <dt>评论</dt>
            <dd><span class="count">11</span></dd>
        </dl>
    </div>
    <div class="grade-box clearfix">
        <dl>
            <dt>等级：</dt>
            <dd>
                <a href="https://blog.csdn.net/home/help.html#level" title="2级,点击查看等级说明" target="_blank">
                    <svg class="icon icon-level" aria-hidden="true">
                        <use xlink:href="#csdnc-bloglevel-2"></use>
                    </svg>
                </a>
            </dd>
        </dl>
        <dl>
            <dt>访问：</dt>
            <dd title="26083">
                2万+            </dd>
        </dl>
        <dl>
            <dt>积分：</dt>
            <dd title="473">
                473            </dd>
        </dl>
        <dl title="152942">
            <dt>排名：</dt>
            <dd>15万+</dd>
        </dl>
    </div>
        <div class="badge-box d-flex">
        <span>勋章：</span>
        <div class="badge d-flex">
                                                        <div class="icon-badge" title="持之以恒">
                       <div class="mouse-box">
                          <img src="https://g.csdnimg.cn/static/user-medal/chizhiyiheng.svg" alt="">
                          <div class="icon-arrow"></div>
                       </div>
                       <div class="grade-detail-box">
                           <div class="pos-box">
                               <div class="left-box d-flex justify-content-center align-items-center flex-column">
                                    <img src="https://g.csdnimg.cn/static/user-medal/chizhiyiheng.svg" alt="">
                                   <p>持之以恒</p>
                               </div>
                               <div class="right-box">
                                   授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里，不积小流无以成江海，程序人生的精彩需要坚持不懈地积累！                               </div>
                           </div>
                       </div>
                   </div>
                                             </div>
        <script>
            (function ($) {
                setTimeout(function(){
                    $('div.icon-badge.show-moment').removeClass('show-moment');
                }, 5000);
            })(window.jQuery)
        </script>
    </div>
        <div class="personal-home-page"><a target="_blank"  href="https://me.csdn.net/shaoyiwenet">TA的个人主页 ></a></div>
</div>
<div class="csdn-tracking-statistics mb8 box-shadow" data-pid="blog" data-report-click='{"mod":"popu_4"}' data-report-view='{"mod":"popu_4"}' style="height:250px;">
    <div class="aside-content text-center" id="cpro_u2734133">
      <div id="kp_box_56" data-pid="56" data-track-view='{"mod":"kp_popu_56-703","con":",,"}' data-track-click='{"mod":"kp_popu_56-703","con":",,"}' data-report-view='{"mod":"kp_popu_56-703","keyword":""}' data-report-click='{"mod":"kp_popu_56-703","keyword":""}'><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 博客内页左上视窗-20181120 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="7700527946"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>    </div>
</div>
<div id="asideNewArticle" class="aside-box">
    <h3 class="aside-title">最新文章</h3>
    <div class="aside-content">
        <ul class="inf_list clearfix csdn-tracking-statistics tracking-click" data-mod="popu_382">
                        <li class="clearfix">
                <a href="https://blog.csdn.net/shaoyiwenet/article/details/79688159" target="_blank" >
                                        CryptDB代码分析5-底层加密库与加密层                </a>
            </li>
                        <li class="clearfix">
                <a href="https://blog.csdn.net/shaoyiwenet/article/details/79612103" target="_blank" >
                                        CryptDB代码分析4-加密元数据读写                </a>
            </li>
                        <li class="clearfix">
                <a href="https://blog.csdn.net/shaoyiwenet/article/details/79520015" target="_blank" >
                                        CryptDB代码分析3-元数据管理结构                </a>
            </li>
                        <li class="clearfix">
                <a href="https://blog.csdn.net/shaoyiwenet/article/details/79453671" target="_blank" >
                                        CryptDB代码分析2-handler与executor                </a>
            </li>
                        <li class="clearfix">
                <a href="https://blog.csdn.net/shaoyiwenet/article/details/79377068" target="_blank" >
                                        CryptDB代码分析1-lua与加密库                </a>
            </li>
                    </ul>
    </div>
</div>
<div id="asideCategory" class="aside-box flexible-box">
    <h3 class="aside-title">个人分类</h3>
    <div class="aside-content">
        <ul>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6447276">
                    <span class="title oneline">Redis</span>
                    <span class="count float-right">4篇</span>
                </a>
            </li>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6531248">
                    <span class="title oneline">MySQL</span>
                    <span class="count float-right">2篇</span>
                </a>
            </li>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6543699">
                    <span class="title oneline">HelloWorld</span>
                    <span class="count float-right">5篇</span>
                </a>
            </li>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6556546">
                    <span class="title oneline">Hbase</span>
                    <span class="count float-right">1篇</span>
                </a>
            </li>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6643019">
                    <span class="title oneline">工具使用</span>
                    <span class="count float-right">1篇</span>
                </a>
            </li>
                        <li>
                <a class="clearfix" href="https://blog.csdn.net/shaoyiwenet/article/category/6895350">
                    <span class="title oneline">Ctyptdb的设计</span>
                    <span class="count float-right">6篇</span>
                </a>
            </li>
                    </ul>
    </div>
        <p class="text-center">
        <a class="btn btn-link-blue flexible-btn" data-fbox="aside-archive">展开</a>
    </p>
    </div>
<div id="asideArchive" class="aside-box flexible-box">
    <h3 class="aside-title">归档</h3>
    <div class="aside-content">
        <ul class="archive-list">
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2018/03">
                    2018年3月                    <span class="count float-right">4篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2018/02">
                    2018年2月                    <span class="count float-right">1篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2017/05">
                    2017年5月                    <span class="count float-right">1篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2017/01">
                    2017年1月                    <span class="count float-right">2篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2016/12">
                    2016年12月                    <span class="count float-right">4篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2016/11">
                    2016年11月                    <span class="count float-right">6篇</span>
                </a>
            </li>
                        <!--归档统计-->
            <li>
                <a href="https://blog.csdn.net/shaoyiwenet/article/month/2016/10">
                    2016年10月                    <span class="count float-right">1篇</span>
                </a>
            </li>
                    </ul>
    </div>
        <p class="text-center">
        <a class="btn btn-link-blue flexible-btn" data-fbox="aside-archive">展开</a>
    </p>
    </div>
<div id="asideHotArticle" class="aside-box">
	<h3 class="aside-title">热门文章</h3>
	<div class="aside-content">
		<ul class="hotArticle-list csdn-tracking-statistics tracking-click" data-report-view='{"mod":"popu_521"}'>
							<li>

					<a href="https://blog.csdn.net/shaoyiwenet/article/details/53256103" >
                                                MySQL的UDF                    </a>
					<p class="read">阅读数 <span>7862</span></p>
				</li>
							<li>

					<a href="https://blog.csdn.net/shaoyiwenet/article/details/71078077" >
                                                Cryptdb原理概述(1)                    </a>
					<p class="read">阅读数 <span>3490</span></p>
				</li>
							<li>

					<a href="https://blog.csdn.net/shaoyiwenet/article/details/53102117" >
                                                多线程数据竞争问题                    </a>
					<p class="read">阅读数 <span>2363</span></p>
				</li>
							<li>

					<a href="https://blog.csdn.net/shaoyiwenet/article/details/53892651" >
                                                cscope快速教程                    </a>
					<p class="read">阅读数 <span>2333</span></p>
				</li>
							<li>

					<a href="https://blog.csdn.net/shaoyiwenet/article/details/53976853" >
                                                MySQL的Embedded模式C接口                    </a>
					<p class="read">阅读数 <span>1311</span></p>
				</li>
					</ul>
	</div>
</div>
<div id="asideNewComments" class="aside-box">
    <h3 class="aside-title">最新评论</h3>
    <div class="aside-content">
        <ul class="newcomment-list">
                        <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/shaoyiwenet/article/details/71078077#comments">Cryptdb原理概述(1)</a>
                <p class="comment ellipsis">
                    <a href="https://my.csdn.net/weixin_38426982" class="user-name" target="_blank">weixin_38426982：</a>如何联系，我的微信号Beijingren。                </p>
            </li>
                        <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830#comments">Cryptdb在Ubuntu16....</a>
                <p class="comment ellipsis">
                    <a href="https://my.csdn.net/sumail123321" class="user-name" target="_blank">sumail123321：</a>大佬您好，我是一名大三学生，最近老师让做关于这方面的东西，由于没有做工程项目的基础，遇到了很多困难，有幸看到了您发的文章，想向您请教一些问题，如果方便的话能否留一个联系方式                </p>
            </li>
                        <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830#comments">Cryptdb在Ubuntu16....</a>
                <p class="comment ellipsis">
                    <a href="https://my.csdn.net/jydu1980" class="user-name" target="_blank">jydu1980：</a>[reply]shaoyiwenet[/reply 谢谢你的回复！我之前很多步骤都调通了，最后的mysql-proxy暂时还不能用。无语！                </p>
            </li>
                        <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830#comments">Cryptdb在Ubuntu16....</a>
                <p class="comment ellipsis">
                    <a href="https://my.csdn.net/shaoyiwenet" class="user-name" target="_blank">shaoyiwenet：</a>[reply]jydu1980[/reply]
这篇文章写完以后代码又更新了好多，master分支上一些东西弄到一半没弄了，可能是有点问题，试试找下以前的commit，或者试试docker版本：
https://github.com/agribu/Practical-Cryptdb_Docker                </p>
            </li>
                        <li>
                <a class="title text-truncate" target="_blank" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830#comments">Cryptdb在Ubuntu16....</a>
                <p class="comment ellipsis">
                    <a href="https://my.csdn.net/jydu1980" class="user-name" target="_blank">jydu1980：</a>很多地方执行出错，包括GitHub上面的INSTALL.sh                </p>
            </li>
                    </ul>
    </div>
</div>
	<div id="asideFooter">
			
		<div class="aside-box">
			<div id="kp_box_57" data-pid="57" data-track-view='{"mod":"kp_popu_57-707","con":",,"}' data-track-click='{"mod":"kp_popu_57-707","con":",,"}' data-report-view='{"mod":"kp_popu_57-707","keyword":""}' data-report-click='{"mod":"kp_popu_57-707","keyword":""}'><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- 博客内页左下视窗-20181130 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-1076724771190722"
     data-ad-slot="1894159733"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script></div>		</div>
				<div class="aside-box">
			<div class="persion_article">
			</div>
		</div>
	</div>
</aside>
<script src="https://csdnimg.cn/pubfooter/js/publib_footer-1.0.3.js" data-isfootertrack="false" type="text/javascript"></script>
<script>
	$("a.flexible-btn").click(function(){
		$(this).parents('div.aside-box').removeClass('flexible-box');
		$(this).remove();
	})
</script>
</div>
<div class="mask-dark"></div>
<div class="tool-box vertical">
    	<ul class="meau-list">
		<li class="btn-like-box long-width">
			<button class=" long-height hover-box btn-like " title="点赞">
				<svg class="icon active hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-thumbsup-ok"></use>
				</svg>
				<svg class="icon no-active hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-thumbsup"></use>
				</svg>
				<span class="hover-show text-box text">
					<span class="no-active">点赞</span>
					<span class="active">取消点赞</span>
				</span>
				<p id="supportCount">1</p>
			</button>
		</li>
		<li class="to-commentBox">
						<a class="btn-comments long-height hover-box" title="写评论" href="#commentBox">
				<svg class="icon hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-comments"></use>
				</svg>
				<span class="hover-show text">评论</span>
				<p class="">
						1				</p>
			</a>
		</li>
		<li class="toc-container-box" id="liTocBox">
			<a class="btn-toc low-height hover-box btn-comments" title="目录">
				<svg class="icon hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-contents"></use>
				</svg>
				<span class="hover-show text">目录</span>
			</a>
			<div class="toc-container">
				<div class="pos-box">
					<div class="icon-arrow"></div>
					<div class="scroll-box">
						<div class="toc-box"></div>
					</div>
				</div>
				<div class="opt-box">
					<button class="btn-opt prev nomore" title="向上">
						<svg class="icon" aria-hidden="true">
							<use xlink:href="#csdnc-chevronup"></use>
						</svg>
					</button>
					<button class="btn-opt next">
						<svg class="icon" aria-hidden="true">
							<use xlink:href="#csdnc-chevrondown"></use>
						</svg>
					</button>
				</div>
			</div>
		</li>
		<li>
			<a class="btn-bookmark low-height hover-box btn-comments" title="收藏">
				<svg class="icon active hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-bookmark-ok"></use>
				</svg>
				<svg class="icon no-active hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-bookmark"></use>
				</svg>
					<span class="hover-show text">收藏</span>
				<!-- <span class="hover-show text-box text">
					<span class="no-active">收藏</span>
					<span class="active">取消收藏</span>
				</span> -->
			</a>
		</li>
		<li class="bdsharebuttonbox">
			<div class="weixin-qr btn-comments low-height hover-box" >
        <a href="#" class="bds_weixin clear-share-style" data-cmd="weixin" title="手机看"></a>
				<svg class="icon hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-usephone"></use>
				</svg>
				<span class="hover-show text text3">
					手机看
				</span>
			</div>
		</li>
							<li class="widescreen-hide">
				<a class="prev btn-comments low-height hover-box" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830" title="Cryptdb在Ubuntu16.04上的安装">
					<svg class="icon hover-hide" aria-hidden="true">
						<use xlink:href="#csdnc-chevronleft"></use>
					</svg>
					<span class="hover-show text text3">上一篇</span>
				</a>
			</li>
								<li class="widescreen-hide">
			<a class="next btn-comments hover-box low-height" href="https://blog.csdn.net/shaoyiwenet/article/details/53373782" title="python的yield使用初探">
				<svg class="icon hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-chevronright"></use>
				</svg>
				<span class="hover-show text text3">下一篇</span>
			</a>
		</li>
						<!-- 宽屏更多按钮 -->
		<li class="widescreen-more">
			<a class="btn-comments chat-ask-button low-height hover-box" title="快问" href="#chatqa">
				<svg class="icon hover-hide" aria-hidden="true">
					<use xlink:href="#csdnc-more"></use>
				</svg>
				<span class="hover-show text">更多</span>
				
			</a>
			<ul class="widescreen-more-box">
													<li class="widescreen-more">
						<a class="btn-comments low-height hover-box" href="https://blog.csdn.net/shaoyiwenet/article/details/53162830" title="Cryptdb在Ubuntu16.04上的安装">
							<svg class="icon hover-hide" aria-hidden="true">
								<use xlink:href="#csdnc-chevronleft"></use>
							</svg>
							<span class="hover-show text text3">上一篇</span>
						</a>
					</li>
																<li class="widescreen-more">
					<a class="btn-comments hover-box low-height" href="https://blog.csdn.net/shaoyiwenet/article/details/53373782" title="python的yield使用初探">
						<svg class="icon hover-hide" aria-hidden="true">
							<use xlink:href="#csdnc-chevronright"></use>
						</svg>
						<span class="hover-show text text3">下一篇</span>
					</a>
				</li>
							</ul>
		</li>
	</ul>
</div>
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'https://csdnimg.cn/static/api/js/share.js?v=89860594'];</script>
<script src="https://g.csdnimg.cn/collection-box/1.0.0/collection-box.js?t=20190710173809" type="text/javascript"></script><script>
    var recommendCount = 50;
    recommendCount = recommendCount > 1 ? (recommendCount + (recommendCount>6 ? 2 : 1)) : recommendCount;
    var ChannelId = 6;
    var articleId = "53256103";
    var commentscount = 1;
    var islock = false;
    var curentUrl = "https://blog.csdn.net/shaoyiwenet/article/details/53256103";
    var myUrl = "https://my.csdn.net/";
    //1禁止评论，2正常
    var commentAuth = 2;
    //百度搜索
    var baiduKey = "MySQL的UDF - shaoyiwenet的专栏";
    var needInsertBaidu = true;
    // 代码段样式
    var codeStyle = '';
	var highlight = ["mysql","udf"];//高亮数组

    var RecommendBlogExpertList = [];
	var articleType = 1;
	var CopyrightContent = '';
</script>
<script src="https://csdnimg.cn/public/sandalstrap/1.4/js/sandalstrap.min.js"></script>
<script src="https://csdnimg.cn/release/phoenix/vendor/pagination/paging-3d3b805766.js"></script>


<div style="display:none;">
	<img src="" onerror='setTimeout(function(){if(!/(csdn.net|iteye.com|baiducontent.com|googleusercontent.com|360webcache.com|sogoucdn.com|bingj.com|baidu.com)$/.test(window.location.hostname)){window.location.href="\x68\x74\x74\x70\x73\x3a\x2f\x2f\x77\x77\x77\x2e\x63\x73\x64\x6e\x2e\x6e\x65\x74"}},3000);'>
</div>
</body>

	<link rel="stylesheet" href="https://csdnimg.cn/release/blog_editor_html/release1.4.3/ckeditor/plugins/codesnippet/lib/highlight/styles/atom-one-light.css">
	<script type="text/javascript" src="https://csdnimg.cn/release/phoenix/production/pc_wap_common-f868939e52.js" /></script>

<script src="https://csdnimg.cn/release/phoenix/template/js/common-37b7aadaf4.min.js"></script>
<script src="https://csdnimg.cn/release/phoenix/template/js/detail-1e5a65cde8.min.js"></script>

	<script src="https://csdnimg.cn/release/phoenix/themes/skin3-template/skin3-template-fc7383b956.min.js"></script>
<script>
 // 全局声明
 if (window.csdn === undefined) {
      window.csdn = {};
    }
    window.csdn.sideToolbar = {
        options: {
            report:{
                isShow: true,
            },
            afterFinished: function(){
                setTimeout(function () {
                    var viphtml = '<a class="option-box" data-type="vip" href="https://mall.csdn.net/vip" target="_blank">'+
                        '<img src="https://g.csdnimg.cn/side-toolbar/1.4/images/vip.png" alt="" srcset="">'+
                        '<span class="show-txt">VIP<br>免广告</span>'+
                        '</a>';
                    $('.csdn-side-toolbar').prepend(viphtml)
                },300)
            }
        }
    }

    $(function(){
        $(document).on('click',"a.option-box[data-type='report']",function() {
            showReport(false,articleTitles)
        });
    })
</script>
<script src="https://g.csdnimg.cn/side-toolbar/1.4/side-toolbar.js"></script>

    <script src="//g.csdnimg.cn/??login-box/1.0.6/login-box.js,login-box/1.0.7/login-auto.js,copyright/1.0.3/copyright.js,baidu-search/1.0.0/baidu-search.js?t=20190307095522"  type="text/javascript"></script>

<script type="text/javascript" src="https://csdnimg.cn/release/blog_mathjax/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/x-mathjax-config">
    MathJax.Hub.Config({
            "HTML-CSS": {
                    linebreaks: { automatic: true, width: "94%container" },
                    imageFont: null
            },
            tex2jax: {
                preview: "none"
            },
            mml2jax: {
                preview: 'none'
            }
    });
</script>
<script type="text/javascript">
    </script>
<script src="https://gh.bdstatic.com/static/gh/js/sdk/bword.min.js"></script>
</html>
